- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.gobblin.yarn.YarnHelixUtils
类的一些代码示例,展示了YarnHelixUtils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnHelixUtils
类的具体详情如下:
包路径:org.apache.gobblin.yarn.YarnHelixUtils
类名称:YarnHelixUtils
[英]A utility class for Gobblin on Yarn.
[中]一个实用类,用于纱线上的Gobblin。
代码示例来源:origin: apache/incubator-gobblin
/**
* Read the {@link Token}s stored in the token file.
*/
@VisibleForTesting
Collection<Token<? extends TokenIdentifier>> readDelegationTokens(Path tokenFilePath) throws IOException {
LOGGER.info("Reading updated token from token file: " + tokenFilePath);
return YarnHelixUtils.readTokensFromFile(tokenFilePath, this.fs.getConf());
}
代码示例来源:origin: apache/incubator-gobblin
private void addAppRemoteFiles(String hdfsFileList, Map<String, LocalResource> resourceMap)
throws IOException {
for (String hdfsFilePath : SPLITTER.split(hdfsFileList)) {
YarnHelixUtils.addFileAsLocalResource(this.fs, new Path(hdfsFilePath), LocalResourceType.FILE, resourceMap);
}
}
代码示例来源:origin: apache/incubator-gobblin
/**
* Write the current delegation token to the token file.
*/
@VisibleForTesting
synchronized void writeDelegationTokenToFile() throws IOException {
if (this.fs.exists(this.tokenFilePath)) {
LOGGER.info("Deleting existing token file " + this.tokenFilePath);
this.fs.delete(this.tokenFilePath, false);
}
LOGGER.info("Writing new or renewed token to token file " + this.tokenFilePath);
YarnHelixUtils.writeTokenToFile(this.token, this.tokenFilePath, this.fs.getConf());
// Only grand access to the token file to the login user
this.fs.setPermission(this.tokenFilePath, new FsPermission(FsAction.READ_WRITE, FsAction.NONE, FsAction.NONE));
}
代码示例来源:origin: apache/incubator-gobblin
private ContainerLaunchContext newContainerLaunchContext(Container container, String helixInstanceName)
throws IOException {
Path appWorkDir = GobblinClusterUtils.getAppWorkDirPath(this.fs, this.applicationName, this.applicationId);
Path containerWorkDir = new Path(appWorkDir, GobblinYarnConfigurationKeys.CONTAINER_WORK_DIR_NAME);
Map<String, LocalResource> resourceMap = Maps.newHashMap();
addContainerLocalResources(new Path(appWorkDir, GobblinYarnConfigurationKeys.LIB_JARS_DIR_NAME), resourceMap);
addContainerLocalResources(new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_JARS_DIR_NAME), resourceMap);
addContainerLocalResources(
new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_FILES_DIR_NAME), resourceMap);
if (this.config.hasPath(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY)) {
addRemoteAppFiles(this.config.getString(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY), resourceMap);
}
ContainerLaunchContext containerLaunchContext = Records.newRecord(ContainerLaunchContext.class);
containerLaunchContext.setLocalResources(resourceMap);
containerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration));
containerLaunchContext.setCommands(Lists.newArrayList(buildContainerCommand(container, helixInstanceName)));
if (UserGroupInformation.isSecurityEnabled()) {
containerLaunchContext.setTokens(this.tokens.duplicate());
}
return containerLaunchContext;
}
代码示例来源:origin: apache/incubator-gobblin
amContainerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration));
amContainerLaunchContext.setCommands(Lists.newArrayList(buildApplicationMasterCommand(resource.getMemory())));
if (UserGroupInformation.isSecurityEnabled()) {
代码示例来源:origin: apache/incubator-gobblin
private void addRemoteAppFiles(String hdfsFileList, Map<String, LocalResource> resourceMap) throws IOException {
for (String hdfsFilePath : SPLITTER.split(hdfsFileList)) {
Path srcFilePath = new Path(hdfsFilePath);
YarnHelixUtils.addFileAsLocalResource(
srcFilePath.getFileSystem(this.yarnConfiguration), srcFilePath, LocalResourceType.FILE, resourceMap);
}
}
代码示例来源:origin: apache/incubator-gobblin
@Test(dependsOnMethods = "testGetNewDelegationTokenForLoginUser")
public void testWriteDelegationTokenToFile() throws IOException {
this.yarnAppSecurityManager.writeDelegationTokenToFile();
Assert.assertTrue(this.localFs.exists(this.tokenFilePath));
assertToken(YarnHelixUtils.readTokensFromFile(this.tokenFilePath, this.configuration));
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
private ContainerLaunchContext newContainerLaunchContext(Container container, String helixInstanceName)
throws IOException {
Path appWorkDir = GobblinClusterUtils.getAppWorkDirPath(this.fs, this.applicationName, this.applicationId);
Path containerWorkDir = new Path(appWorkDir, GobblinYarnConfigurationKeys.CONTAINER_WORK_DIR_NAME);
Map<String, LocalResource> resourceMap = Maps.newHashMap();
addContainerLocalResources(new Path(appWorkDir, GobblinYarnConfigurationKeys.LIB_JARS_DIR_NAME), resourceMap);
addContainerLocalResources(new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_JARS_DIR_NAME), resourceMap);
addContainerLocalResources(
new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_FILES_DIR_NAME), resourceMap);
if (this.config.hasPath(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY)) {
addRemoteAppFiles(this.config.getString(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY), resourceMap);
}
ContainerLaunchContext containerLaunchContext = Records.newRecord(ContainerLaunchContext.class);
containerLaunchContext.setLocalResources(resourceMap);
containerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration));
containerLaunchContext.setCommands(Lists.newArrayList(buildContainerCommand(container, helixInstanceName)));
if (UserGroupInformation.isSecurityEnabled()) {
containerLaunchContext.setTokens(this.tokens.duplicate());
}
return containerLaunchContext;
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
/**
* Write the current delegation token to the token file.
*/
@VisibleForTesting
synchronized void writeDelegationTokenToFile() throws IOException {
if (this.fs.exists(this.tokenFilePath)) {
LOGGER.info("Deleting existing token file " + this.tokenFilePath);
this.fs.delete(this.tokenFilePath, false);
}
LOGGER.info("Writing new or renewed token to token file " + this.tokenFilePath);
YarnHelixUtils.writeTokenToFile(this.token, this.tokenFilePath, this.fs.getConf());
// Only grand access to the token file to the login user
this.fs.setPermission(this.tokenFilePath, new FsPermission(FsAction.READ_WRITE, FsAction.NONE, FsAction.NONE));
}
代码示例来源:origin: apache/incubator-gobblin
private void addContainerLocalResources(Path destDir, Map<String, LocalResource> resourceMap) throws IOException {
if (!this.fs.exists(destDir)) {
LOGGER.warn(String.format("Path %s does not exist so no container LocalResource to add", destDir));
return;
}
FileStatus[] statuses = this.fs.listStatus(destDir);
if (statuses != null) {
for (FileStatus status : statuses) {
YarnHelixUtils.addFileAsLocalResource(this.fs, status.getPath(), LocalResourceType.FILE, resourceMap);
}
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
/**
* Read the {@link Token}s stored in the token file.
*/
@VisibleForTesting
Collection<Token<? extends TokenIdentifier>> readDelegationTokens(Path tokenFilePath) throws IOException {
LOGGER.info("Reading updated token from token file: " + tokenFilePath);
return YarnHelixUtils.readTokensFromFile(tokenFilePath, this.fs.getConf());
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
amContainerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration));
amContainerLaunchContext.setCommands(Lists.newArrayList(buildApplicationMasterCommand(resource.getMemory())));
if (UserGroupInformation.isSecurityEnabled()) {
代码示例来源:origin: apache/incubator-gobblin
private void addAppLocalFiles(String localFilePathList, Optional<Map<String, LocalResource>> resourceMap,
Path destDir) throws IOException {
for (String localFilePath : SPLITTER.split(localFilePathList)) {
Path srcFilePath = new Path(localFilePath);
Path destFilePath = new Path(destDir, srcFilePath.getName());
this.fs.copyFromLocalFile(srcFilePath, destFilePath);
if (resourceMap.isPresent()) {
YarnHelixUtils.addFileAsLocalResource(this.fs, destFilePath, LocalResourceType.FILE, resourceMap.get());
}
}
}
代码示例来源:origin: apache/incubator-gobblin
private void addAppJars(String jarFilePathList, Optional<Map<String, LocalResource>> resourceMap,
Path destDir) throws IOException {
for (String jarFilePath : SPLITTER.split(jarFilePathList)) {
Path srcFilePath = new Path(jarFilePath);
Path destFilePath = new Path(destDir, srcFilePath.getName());
this.fs.copyFromLocalFile(srcFilePath, destFilePath);
if (resourceMap.isPresent()) {
YarnHelixUtils.addFileAsLocalResource(this.fs, destFilePath, LocalResourceType.FILE, resourceMap.get());
}
}
}
代码示例来源:origin: apache/incubator-gobblin
private void addLibJars(Path srcLibJarDir, Optional<Map<String, LocalResource>> resourceMap, Path destDir)
throws IOException {
FileSystem localFs = FileSystem.getLocal(this.yarnConfiguration);
FileStatus[] libJarFiles = localFs.listStatus(srcLibJarDir);
if (libJarFiles == null || libJarFiles.length == 0) {
return;
}
for (FileStatus libJarFile : libJarFiles) {
Path destFilePath = new Path(destDir, libJarFile.getPath().getName());
this.fs.copyFromLocalFile(libJarFile.getPath(), destFilePath);
if (resourceMap.isPresent()) {
YarnHelixUtils.addFileAsLocalResource(this.fs, destFilePath, LocalResourceType.FILE, resourceMap.get());
}
}
}
代码示例来源:origin: apache/incubator-gobblin
private void addJobConfPackage(String jobConfPackagePath, Path destDir, Map<String, LocalResource> resourceMap)
throws IOException {
Path srcFilePath = new Path(jobConfPackagePath);
Path destFilePath = new Path(destDir, srcFilePath.getName() + GobblinClusterConfigurationKeys.TAR_GZ_FILE_SUFFIX);
StreamUtils.tar(FileSystem.getLocal(this.yarnConfiguration), this.fs, srcFilePath, destFilePath);
YarnHelixUtils.addFileAsLocalResource(this.fs, destFilePath, LocalResourceType.ARCHIVE, resourceMap);
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
private void addAppRemoteFiles(String hdfsFileList, Map<String, LocalResource> resourceMap)
throws IOException {
for (String hdfsFilePath : SPLITTER.split(hdfsFileList)) {
YarnHelixUtils.addFileAsLocalResource(this.fs, new Path(hdfsFilePath), LocalResourceType.FILE, resourceMap);
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
private void addRemoteAppFiles(String hdfsFileList, Map<String, LocalResource> resourceMap) throws IOException {
for (String hdfsFilePath : SPLITTER.split(hdfsFileList)) {
Path srcFilePath = new Path(hdfsFilePath);
YarnHelixUtils.addFileAsLocalResource(
srcFilePath.getFileSystem(this.yarnConfiguration), srcFilePath, LocalResourceType.FILE, resourceMap);
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
private void addContainerLocalResources(Path destDir, Map<String, LocalResource> resourceMap) throws IOException {
if (!this.fs.exists(destDir)) {
LOGGER.warn(String.format("Path %s does not exist so no container LocalResource to add", destDir));
return;
}
FileStatus[] statuses = this.fs.listStatus(destDir);
if (statuses != null) {
for (FileStatus status : statuses) {
YarnHelixUtils.addFileAsLocalResource(this.fs, status.getPath(), LocalResourceType.FILE, resourceMap);
}
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-yarn
private void addAppJars(String jarFilePathList, Optional<Map<String, LocalResource>> resourceMap,
Path destDir) throws IOException {
for (String jarFilePath : SPLITTER.split(jarFilePathList)) {
Path srcFilePath = new Path(jarFilePath);
Path destFilePath = new Path(destDir, srcFilePath.getName());
this.fs.copyFromLocalFile(srcFilePath, destFilePath);
if (resourceMap.isPresent()) {
YarnHelixUtils.addFileAsLocalResource(this.fs, destFilePath, LocalResourceType.FILE, resourceMap.get());
}
}
}
我正在尝试使用 gobblin 从 mysql 到 hdfs 数据摄取。使用以下步骤运行 mysql-to-gobblin.pull 时: 1)启动hadoop: sbin\start-all.cmd
本文整理了Java中gobblin.source.workunit.WorkUnit类的一些代码示例,展示了WorkUnit类的具体用法。这些代码示例主要来源于Github/Stackoverflow
我想在MacOS X上安装Apache Gobblin。为此,我下载了版本0.14.0,并按照此处的步骤进行操作。 Install Gobblin 我做的第一件事是: tar -xvf incubat
尝试从 git clone 下载和构建 Gobblin 时。通过关注,在本地下载并构建 Gobblin在您的本地计算机上,克隆 Gobblin 存储库: git clone git@github.co
本文整理了Java中org.apache.gobblin.writer.WriterOutputFormat类的一些代码示例,展示了WriterOutputFormat类的具体用法。这些代码示例主要来
本文整理了Java中org.apache.gobblin.writer.WatermarkAwareWriter类的一些代码示例,展示了WatermarkAwareWriter类的具体用法。这些代码示
本文整理了Java中org.apache.gobblin.writer.WriteResponseMapper类的一些代码示例,展示了WriteResponseMapper类的具体用法。这些代码示例主
本文整理了Java中org.apache.gobblin.util.WritableShimSerialization类的一些代码示例,展示了WritableShimSerialization类的具体
本文整理了Java中org.apache.gobblin.yarn.YarnContainerSecurityManager类的一些代码示例,展示了YarnContainerSecurityManag
本文整理了Java中org.apache.gobblin.yarn.YarnAppSecurityManager类的一些代码示例,展示了YarnAppSecurityManager类的具体用法。这些代
本文整理了Java中org.apache.gobblin.yarn.YarnHelixUtils类的一些代码示例,展示了YarnHelixUtils类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.gobblin.yarn.YarnService类的一些代码示例,展示了YarnService类的具体用法。这些代码示例主要来源于Github/Stackov
我正在评估一个大数据项目,我们需要从各种互联网来源(ftp、api 等)提取大量大数据集,进行轻量级转换和轻量级数据质量/健全性检查(例如:行和列检查),并将其推向下游。直接关注点是批量的,但预计会支
我正在运行gobblin,以使用3节点EMR集群将数据从kafka移至s3。我在hadoop 2.6.0上运行,并且还针对2.6.0构建了gobblin。 似乎map-reduce作业成功运行。在我的
我研究 Gobblin 一段时间了,目前我在使用 Gobblin 从 Facebook 获取帖子时遇到了困难。我在互联网上找不到任何连接示例,或者我可能搜索错误。 我正在考虑将restfb集成到Gob
本文整理了Java中org.apache.gobblin.source.workunit.WorkUnitStream类的一些代码示例,展示了WorkUnitStream类的具体用法。这些代码示例主要
本文整理了Java中gobblin.source.workunit.WorkUnit.readFields()方法的一些代码示例,展示了WorkUnit.readFields()的具体用法。这些代码示
本文整理了Java中gobblin.source.workunit.WorkUnit.createEmpty()方法的一些代码示例,展示了WorkUnit.createEmpty()的具体用法。这些代
本文整理了Java中gobblin.source.workunit.WorkUnit.getExtract()方法的一些代码示例,展示了WorkUnit.getExtract()的具体用法。这些代码示
本文整理了Java中gobblin.source.workunit.WorkUnit.getLowWatermark()方法的一些代码示例,展示了WorkUnit.getLowWatermark()的
我是一名优秀的程序员,十分优秀!