问题标签 [apache-twill]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
296 浏览

hadoop-yarn - 在 YARN 中使用 Janino 和 Apache Twill 会导致“无法加载导入的类 xy”

我正在使用 Apache Twill 将一个使用 Janino 动态编译类的开源项目移植到 YARN。这很好用,除了最后一个错误。当 Janino 与斜纹一起使用时,我得到一个找不到类的异常,尽管该类在 Classpath 中甚至使用过。

我得到的例外是:

2014-06-09T18:30:40,093Z 错误 oadepipProjectRecordBatch [zk1] [37daf04b-7d82-4d2f-987c-59851f2aeafe:frag:0:0] AbstractSingleRecordBatch:next(AbstractSingleRecordBatch.java:60) - 查询 org.apache 期间失败。 Drill.exec.exception.SchemaChangeException:尝试在 org.apache.drill.exec.record 的 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:243) 加载生成的类时失败.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:57) at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.next(ProjectRecordBatch.java:83) at org.apache.drill.exec.record.AbstractSingleRecordBatch.next (AbstractSingleRecordBatch.java:45) 在 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.next(LimitRecordBatch.java:99) 在 org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:45) 在 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94) 在 org .apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:80) at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:104) at java.util .concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 原因: org.apache.drill.exec.exception.ClassTransformationException:失败svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94) 在 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:80) 在 org.apache.drill.exec.work.fragment。 FragmentExecutor.run(FragmentExecutor.java:104) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang .Thread.run(Thread.java:744) 引起:org.apache.drill.exec.exception.ClassTransformationException:失败svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94) 在 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:80) 在 org.apache.drill.exec.work.fragment。 FragmentExecutor.run(FragmentExecutor.java:104) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang .Thread.run(Thread.java:744) 引起:org.apache.drill.exec.exception.ClassTransformationException:失败runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 原因:org.apache.drill .exec.exception.ClassTransformationException:失败runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 原因:org.apache.drill .exec.exception.ClassTransformationException:失败

为值生成转换类:

在 org.apache.drill.exec.compile.ClassTransformer.getImplementationClass(ClassTransformer.java:302) 在 org.apache.drill.exec.ops.FragmentContext.getImplementationClass(FragmentContext.java:185) 在 org.apache.drill.exec .physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:240) 在 org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:57) 在 org.apache.drill.exec.physical.impl .project.ProjectRecordBatch.next(ProjectRecordBatch.java:83) 在 org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:45) 在 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch .next(LimitRecordBatch.java:99) 在 org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:45) 在 org.apache.drill.exec.physical。在 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:80) 在 org.apache.drill.exec.work 的 impl.svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94)。 fragment.FragmentExecutor.run(FragmentExecutor.java:104) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java .lang.Thread.run(Thread.java:744) 原因:org.codehaus.commons.compiler.CompileException:第 4 行第 8 列:无法导入的类“org.apache.drill.exec.exception.SchemaChangeException”在 org.codehaus.janino.UnitCompiler.import2(UnitCompiler.java:192) 的 org.codehaus.janino.UnitCompiler 的 org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:9014) 加载。访问 $000(UnitCompiler.java:104) at org.codehaus.janino.UnitCompiler$1.visitSingleTypeImportDeclaration(UnitCompiler.java:166) at org.codehaus.janino.Java$CompilationUnit$SingleTypeImportDeclaration.accept(Java.java:171) at org .codehaus.janino.UnitCompiler.(UnitCompiler.java:164) 在 org.apache.drill.exec.compile.JaninoClassCompiler.getClassByteCode(JaninoClassCompiler.java:53) 在 org.apache.drill.exec.compile.QueryClassLoader.getClassByteCode( QueryClassLoader.java:69) at org.apache.drill.exec.compile.ClassTransformer.getImplementationClass(ClassTransformer.java:256) at org.apache.drill.exec.ops.FragmentContext.getImplementationClass(FragmentContext.java:185) at org .apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:240) 在 org.apache.drill.exec.record。AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:57) at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.next(ProjectRecordBatch.java:83) at org.apache.drill.exec.record.AbstractSingleRecordBatch.next( AbstractSingleRecordBatch.java:45) at org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.next(LimitRecordBatch.java:99) at org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java: 45) 在 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94) 在 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java: 80) 在 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:104) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang.Thread.run(Thread.java:744)

如您所见,异常的类型是,SchemaChangeException但内部异常是ClassNotFoundExceptionfor SchemaChangeException

第 4 行第 8 列:无法加载导入的类“org.apache.drill.exec.exception.SchemaChangeException”

所以类加载器有问题,当应用程序使用 Apache Twill 运行时,它会发生变化。它独立工作,但在这两种情况下,底层 jar 都是相同的。

Apache Twill 还有一个添加额外资源的功能,但是在那里添加我的 jar 也不起作用,相反我得到了一个异常,即 jar 已经包含在内:

线程“ServiceDelegate STARTING”中的异常 java.lang.RuntimeException:java.util.zip.ZipException:重复条目:lib/drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar

在 com.google.common.base.Throwables.propagate(Throwables.java:160) 在 org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:133) 在 org.apache.twill.internal.AbstractZKServiceController.startUp (AbstractZKServiceController.java:82) 在 org.apache.twill.internal.AbstractExecutionServiceController$ServiceDelegate.startUp(AbstractExecutionServiceController.java:109) 在 com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43 ) 在 java.lang.Thread.run(Thread.java:744) 引起:java.util.zip.ZipException:重复条目:lib/drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed。 jar 在 java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:215) 在 java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109) 在 org.apache.twill.internal。ApplicationBundler.copyResource(ApplicationBundler.java:347) 在 org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:140) 在 org.apache.twill.yarn.YarnTwillPreparer.createContainerJar(YarnTwillPreparer.java:388) 在 org .apache.twill.yarn.YarnTwillPreparer.access$300(YarnTwillPreparer.java:106) 在 org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:264) 在 org.apache.twill.yarn.YarnTwillPreparer$1。在 org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:98) 处调用(YarnTwillPreparer.java:253) ... 还有 4 个yarn.YarnTwillPreparer.access$300(YarnTwillPreparer.java:106) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:264) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java :253) 在 org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:98) ... 4 更多yarn.YarnTwillPreparer.access$300(YarnTwillPreparer.java:106) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:264) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java :253) 在 org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:98) ... 4 更多

使用的底层类加载器是URLClassLoader. 它是用一个空数组初始化的,但它适用于独立应用程序,问题只是当它与 Apache Twill 一起运行时,它从哪里获取它应该查找的 URL?我怎么能检查它?

类加载器定义:

我可以研究的任何想法,为什么会发生错误或如何解决它?

0 投票
1 回答
200 浏览

java - Apache Twill HelloWorld 应用程序失败 - 找不到 jar

有没有人在运行 HelloWorld Twill 示例时遇到问题?我的应用程序被接受,但随后转换为“失败”状态。

纱线应用程序 HelloWorldRunnable application_1406337868863_0013 已完成,状态为 FAILED

YARN Web UI 将此显示为错误:

Application application_1406337868863_0013 failed 2 times due to AM Container for appattempt_1406337868863_0013_000002 exited with exitCode: -1000 due to: File file:/twill/HelloWorldRunnable/2ba08d9f-ca23-4363-a7be-426b93c88de2/appMaster.775a1137-6134-46e2-b270-fc466ce7fe91. jar 不存在。此尝试失败.. 应用程序失败。

YARN 是否希望在 HDFS 上的上述位置找到这个 jar?似乎 jar 在上面指定的位置被复制到我的本地 FS,但没有被复制到 HDFS。

0 投票
1 回答
455 浏览

java - 如何打包和运行斜纹示例应用程序

我正在尝试使用apache twill构建一个 YARN 应用程序。从twill 演示的幻灯片中,他们正在谈论使用maven-bundle-plugin来包装 hello world 示例。

所以为了打包示例 hello world,我首先尝试将 jar 打包为mvn assembly:assembly -DdescriptorId=jar-with-dependencies. 然后通过将以下内容添加到pom.xml(并执行mvn clean install):

斜纹应用是如何打包的?然后如何在 hadoop 上运行它们?

0 投票
1 回答
192 浏览

apache - 无法在 hortonworks 沙箱和 Eclipse 中启动 apache twill

我无法启动我的开发环境并在 hortonworks 沙箱和 eclipse 中运行一个简单的斜纹布应用程序。

我可以编译所有东西,但是当我在 Eclipse 中启动它时,我最终遇到了这个错误。

0 投票
1 回答
563 浏览

hadoop-yarn - Apache Twill HelloWorld 示例失败

当我按照http://twill.incubator.apache.org/GettingStarted.html中的说明运行 Apache twill HelloWorld 示例时,我得到以下日志:

应用程序被接受,但随后转换到“失败”状态。

YARN Web UI 将此显示为错误(非常不具体):

节点日志显示:

有什么问题?我认为 hadoop 类应该在纱线应用程序的类路径上。如何解决?

0 投票
1 回答
111 浏览

hadoop - Apache Twill 是否会重新启动被 Yarn 杀死的容器?

当集群负载过重时,Yarn 会杀死容器。当容器中运行的其中一个 runnablse 被杀死时,Apache Twill 会如何反应?它是在减少可运行实例数量的情况下运行还是重新启动它?

0 投票
1 回答
2293 浏览

hadoop-yarn - 在 HDP 升级后在 hadoop 集群中启动 Apache Twill 应用程序时 RequestHedgingRMFailoverProxyProvider 的 IllegalAccessError

我正在尝试从 hadoop 集群启动 Apache Twill 应用程序,该集群最近从 HDP 2.2 升级到了 HDP 2.5,但我得到了 RequestHedgingRMFailoverProxyProvider 类的 llegalAccessError 。这个类是 org.apache.hadoop.yarn.client 包的一部分。我在 Application Master 中收到此错误。在“接受状态”之后,作业状态直接变为“未运行状态”。

0 投票
0 回答
78 浏览

hadoop - 在 Apache Twill v0.10.0 的 Yarn 应用程序中启用 ACL

我在 HDP 2.5 集群中使用 Apache Twill (0.10.0) 运行纱线应用程序。当我转到容器网页时,我看不到任何容器日志: 在此处输入图像描述 我想我需要从 ContainerLaunchContext 中的应用程序内部设置 ACL。Apache Twill 是否会公开一些 API 来设置应用程序 ACL,以执行此处提到的类似操作:

还是存在一种解决方法,以便我可以看到我的容器日志?

0 投票
1 回答
3836 浏览

hadoop - 获取“用户 [dr.who] 无权查看应用程序日志" 在运行 YARN 应用程序时

我在 HDP 2.5 集群中使用 Apache Twill 运行自定义 Yarn 应用程序,但是当我转到我的容器网页时,我无法看到自己的容器日志(syslog、stderr 和 stdout): 在此处输入图像描述

当我导航到此页面时,登录也从我的 kerberos 更改为“dr.who”。但我可以看到 map-reduce 作业的日志。Hadoop 版本为 2.7.3,集群启用了 yarn acl。

0 投票
1 回答
45 浏览

hadoop-yarn - 为 Apache Twill 中的不同可运行对象提供不同的 JVM 选项

在斜纹应用程序中,假设我有两种类型的可运行文件。一个 runnable 的容器大小为 3GB,而另一个 runnable 的容器大小为 6GB。现在我想为这两种可运行类型设置不同的 -Xms 选项。如何为不同的可运行类型提供不同的 JVM 选项?

我只能找到这个setJVMOptions函数,但它为所有可运行对象提供 JVM 选项。