Example usage for org.apache.hadoop.yarn.api.records LocalResourceVisibility PUBLIC

List of usage examples for org.apache.hadoop.yarn.api.records LocalResourceVisibility PUBLIC

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records LocalResourceVisibility PUBLIC.

Prototype

LocalResourceVisibility PUBLIC

To view the source code for org.apache.hadoop.yarn.api.records LocalResourceVisibility PUBLIC.

Click Source Link

Document

Shared by all users on the node.

Usage

From source file:yrun.YarnRunner.java

License:Apache License

private void setupAppMasterJar(Path jarPath, LocalResource appMasterJar) throws IOException {
    FileSystem fileSystem = jarPath.getFileSystem(_configuration);
    FileStatus jarStatus = fileSystem.getFileStatus(jarPath);
    appMasterJar.setResource(ConverterUtils.getYarnUrlFromPath(jarPath));
    appMasterJar.setSize(jarStatus.getLen());
    appMasterJar.setTimestamp(jarStatus.getModificationTime());
    appMasterJar.setType(LocalResourceType.FILE);
    appMasterJar.setVisibility(LocalResourceVisibility.PUBLIC);
}