Search in sources :

Example 6 with SCMUploaderProtocol

use of org.apache.hadoop.yarn.server.api.SCMUploaderProtocol in project hadoop by apache.

the class TestSharedCacheUploader method createSpiedUploader.

private SharedCacheUploader createSpiedUploader() throws IOException {
    Configuration conf = new Configuration();
    conf.setBoolean(YarnConfiguration.SHARED_CACHE_ENABLED, true);
    LocalResource resource = mock(LocalResource.class);
    Path localPath = mock(Path.class);
    String user = "foo";
    SCMUploaderProtocol scmClient = mock(SCMUploaderProtocol.class);
    FileSystem fs = FileSystem.get(conf);
    FileSystem localFs = FileSystem.getLocal(conf);
    return createSpiedUploader(resource, localPath, user, conf, scmClient, fs, localFs);
}
Also used : Path(org.apache.hadoop.fs.Path) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) SCMUploaderProtocol(org.apache.hadoop.yarn.server.api.SCMUploaderProtocol) LocalResource(org.apache.hadoop.yarn.api.records.LocalResource)

Aggregations

SCMUploaderProtocol (org.apache.hadoop.yarn.server.api.SCMUploaderProtocol)6 Configuration (org.apache.hadoop.conf.Configuration)5 FileSystem (org.apache.hadoop.fs.FileSystem)5 Path (org.apache.hadoop.fs.Path)5 LocalResource (org.apache.hadoop.yarn.api.records.LocalResource)5 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)5 Test (org.junit.Test)4 SCMUploaderNotifyRequest (org.apache.hadoop.yarn.server.api.protocolrecords.SCMUploaderNotifyRequest)2 SCMUploaderNotifyResponse (org.apache.hadoop.yarn.server.api.protocolrecords.SCMUploaderNotifyResponse)2 InetSocketAddress (java.net.InetSocketAddress)1 FileStatus (org.apache.hadoop.fs.FileStatus)1 YarnRPC (org.apache.hadoop.yarn.ipc.YarnRPC)1