private Path uploadSecurityResource(File resource, SliderFileSystem fileSystem) throws IOException { Path certsDir = fileSystem.buildClusterSecurityDirPath(getClusterName()); return uploadResource(resource, fileSystem, certsDir); }
private Path uploadSecurityResource(File resource, SliderFileSystem fileSystem) throws IOException { Path certsDir = fileSystem.buildClusterSecurityDirPath(getClusterName()); return uploadResource(resource, fileSystem, certsDir); }
private void uploadServerCertForLocalization(String clustername, SliderFileSystem fs) throws IOException { Path certsDir = fs.buildClusterSecurityDirPath(clustername); if (!fs.getFileSystem().exists(certsDir)) { fs.getFileSystem().mkdirs(certsDir, new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE)); } Path destPath = new Path(certsDir, SliderKeys.CRT_FILE_NAME); if (!fs.getFileSystem().exists(destPath)) { fs.getFileSystem().copyFromLocalFile( new Path(CertificateManager.getServerCertficateFilePath().getAbsolutePath()), destPath); log.info("Uploaded server cert to localization path {}", destPath); } fs.getFileSystem().setPermission(destPath, new FsPermission(FsAction.READ, FsAction.NONE, FsAction.NONE)); }
private void uploadServerCertForLocalization(String clustername, SliderFileSystem fs) throws IOException { Path certsDir = fs.buildClusterSecurityDirPath(clustername); if (!fs.getFileSystem().exists(certsDir)) { fs.getFileSystem().mkdirs(certsDir, new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE)); } Path destPath = new Path(certsDir, SliderKeys.CRT_FILE_NAME); if (!fs.getFileSystem().exists(destPath)) { fs.getFileSystem().copyFromLocalFile( new Path(CertificateManager.getServerCertficateFilePath().getAbsolutePath()), destPath); log.info("Uploaded server cert to localization path {}", destPath); } fs.getFileSystem().setPermission(destPath, new FsPermission(FsAction.READ, FsAction.NONE, FsAction.NONE)); }
try { Path certsDir = fileSystem.buildClusterSecurityDirPath(getClusterName()); LocalResource certResource = fileSystem.createAmResource( new Path(certsDir, SliderKeys.CRT_FILE_NAME),
try { Path certsDir = fileSystem.buildClusterSecurityDirPath(getClusterName()); LocalResource certResource = fileSystem.createAmResource( new Path(certsDir, SliderKeys.CRT_FILE_NAME),