Search in sources :

Example 1 with ManagerAgentService

use of alluxio.hub.manager.rpc.service.ManagerAgentService in project alluxio by Alluxio.

the class AgentProcessContextTest method before.

@Before
public void before() throws Exception {
    mContext = getTestManagerContext();
    mServerName = InProcessServerBuilder.generateName();
    mServer = InProcessServerBuilder.forName(mServerName).directExecutor().addService(new ManagerAgentService(mContext)).build();
    mServer.start();
    mChannel = InProcessChannelBuilder.forName(mServerName).directExecutor().build();
    mClient = new InProcessRpcClient<>(InetSocketAddress.createUnresolved(mServerName, 0), ManagerAgentServiceGrpc::newBlockingStub, (addr) -> InProcessChannelBuilder.forName(mServerName).directExecutor().build());
}
Also used : ManagedChannel(io.grpc.ManagedChannel) Assert.assertThrows(org.junit.Assert.assertThrows) NetworkAddressUtils(alluxio.util.network.NetworkAddressUtils) PropertyKey(alluxio.conf.PropertyKey) InProcessServerBuilder(io.grpc.inprocess.InProcessServerBuilder) WaitForOptions(alluxio.util.WaitForOptions) ManagerProcessContext(alluxio.hub.manager.process.ManagerProcessContext) After(org.junit.After) Server(io.grpc.Server) InProcessChannelBuilder(io.grpc.inprocess.InProcessChannelBuilder) AlluxioCluster(alluxio.hub.proto.AlluxioCluster) RetryPolicy(alluxio.retry.RetryPolicy) Before(org.junit.Before) RpcClient(alluxio.hub.common.RpcClient) ManagerAgentServiceGrpc(alluxio.hub.proto.ManagerAgentServiceGrpc) InProcessRpcClient(alluxio.hub.common.InProcessRpcClient) Test(org.junit.Test) HubNodeStatus(alluxio.hub.proto.HubNodeStatus) InetSocketAddress(java.net.InetSocketAddress) AlluxioNodeStatus(alluxio.hub.proto.AlluxioNodeStatus) BaseHubTest(alluxio.hub.test.BaseHubTest) TimeUnit(java.util.concurrent.TimeUnit) ManagerAgentService(alluxio.hub.manager.rpc.service.ManagerAgentService) Rule(org.junit.Rule) InstancedConfiguration(alluxio.conf.InstancedConfiguration) Assert.assertEquals(org.junit.Assert.assertEquals) ExponentialBackoffRetry(alluxio.retry.ExponentialBackoffRetry) CommonUtils(alluxio.util.CommonUtils) TemporaryFolder(org.junit.rules.TemporaryFolder) ManagerAgentService(alluxio.hub.manager.rpc.service.ManagerAgentService) Before(org.junit.Before)

Aggregations

InstancedConfiguration (alluxio.conf.InstancedConfiguration)1 PropertyKey (alluxio.conf.PropertyKey)1 InProcessRpcClient (alluxio.hub.common.InProcessRpcClient)1 RpcClient (alluxio.hub.common.RpcClient)1 ManagerProcessContext (alluxio.hub.manager.process.ManagerProcessContext)1 ManagerAgentService (alluxio.hub.manager.rpc.service.ManagerAgentService)1 AlluxioCluster (alluxio.hub.proto.AlluxioCluster)1 AlluxioNodeStatus (alluxio.hub.proto.AlluxioNodeStatus)1 HubNodeStatus (alluxio.hub.proto.HubNodeStatus)1 ManagerAgentServiceGrpc (alluxio.hub.proto.ManagerAgentServiceGrpc)1 BaseHubTest (alluxio.hub.test.BaseHubTest)1 ExponentialBackoffRetry (alluxio.retry.ExponentialBackoffRetry)1 RetryPolicy (alluxio.retry.RetryPolicy)1 CommonUtils (alluxio.util.CommonUtils)1 WaitForOptions (alluxio.util.WaitForOptions)1 NetworkAddressUtils (alluxio.util.network.NetworkAddressUtils)1 ManagedChannel (io.grpc.ManagedChannel)1 Server (io.grpc.Server)1 InProcessChannelBuilder (io.grpc.inprocess.InProcessChannelBuilder)1 InProcessServerBuilder (io.grpc.inprocess.InProcessServerBuilder)1