首页 \ 问答 \ 将Spark添加到Oozie共享库(Add Spark to Oozie shared lib)

将Spark添加到Oozie共享库(Add Spark to Oozie shared lib)

默认情况下,Oozie共享的lib目录为Hive,Pig和Map-Reduce提供了库。 如果我想在Oozie上运行Spark作业,最好将Spark lib jar添加到Oozie的共享库中,而不是将它们复制到app的lib目录中。
如何在Oozie的共享库中添加Spark lib jar(包括spark-core及其依赖项)? 任何评论/答案表示赞赏。


By default, Oozie shared lib directory provides libraries for Hive, Pig, and Map-Reduce. If I want to run Spark job on Oozie, it might be better to add Spark lib jars to Oozie's shared lib instead of copy them to app's lib directory.
How can I add Spark lib jars (including spark-core and its dependencies) to Oozie's shared lib? Any comment / answer is appreciated.


原文:https://stackoverflow.com/questions/30565546
更新时间:2022-07-24 21:07

最满意答案

使用更新的gcc :-)似乎对我工作正常:

stieber@gatekeeper:~$ g++ -Wall -Wuninitialized -Winit-self -c Test.cpp
Test.cpp: In constructor ‘Foo::Foo(int)’:
Test.cpp:5:9: warning: ‘Foo::a’ is initialized with itself [-Wuninitialized]

stieber@gatekeeper:~$ gcc --version
gcc (Debian 4.7.1-2) 4.7.1

Use a newer gcc :-) Seems to work fine for me:

stieber@gatekeeper:~$ g++ -Wall -Wuninitialized -Winit-self -c Test.cpp
Test.cpp: In constructor ‘Foo::Foo(int)’:
Test.cpp:5:9: warning: ‘Foo::a’ is initialized with itself [-Wuninitialized]

stieber@gatekeeper:~$ gcc --version
gcc (Debian 4.7.1-2) 4.7.1

相关问答

更多
  • 你想要的正确语法是: Aggregate a{{3}}; 这为NoCopy成员提供了一个初始化程序。 没有额外的{}编译器需要执行从int到NoCopy的转换(它通过非显式构造函数高兴地执行),然后使用它来构造nc 。 这通常会作为移动构造出现,但通过删除复制构件,您也可以有效地删除移动构造器。 一个更简单的方法来思考它可能是想象NoCopy有一个值构造函数接受两个参数而不是一个: struct NoCopy { NoCopy(int, int); }; 现在如果你写了 Aggregate a{ ...
  • 什么是书面代码与具有相同顺序的代码的区别? 如果成员不依赖于彼此的初始化顺序,则没有任何区别。 但如果他们这样做,那么成员初始化列表可能会说谎。 当程序员认为他们的构造函数写得正确时,很多程序员都被这种方式所咬,但实际上他们手上的行为是不确定的。 考虑这个简单的情况: struct foo { int _a; int _b; foo(int b) : _b(b), _a(2 * _b) {} }; 上面例子中的_a是什么? 如果你回答“行为未定义,因为_b被初始化” ,那你就错了。 Whats ...
  • 如果你想要一个自己的共享指针,你可以使用Boost的enable_shared_from_this 。 我不知道是否有一种简单的标准方法来完成相同的事情,但它只是一个模板,所以你可以想象没有Boost做同样的事情。 If you want a shared pointer to yourself, you can use Boost's enable_shared_from_this. I don't know if there's an easy standard way to accomplish th ...
  • 使用更新的gcc :-)似乎对我工作正常: stieber@gatekeeper:~$ g++ -Wall -Wuninitialized -Winit-self -c Test.cpp Test.cpp: In constructor ‘Foo::Foo(int)’: Test.cpp:5:9: warning: ‘Foo::a’ is initialized with itself [-Wuninitialized] stieber@gatekeeper:~$ gcc --version gcc (D ...
  • 静态成员应该在源文件中定义,但请注意,您可以首先使用空指针初始化它: // source file: B* A::bPoint; // note the pointer to B 然后,如果你的问题是将参数转发到A::init()到B()的构造函数,你可以在A::init()为bPoint分配一个对象: A::init(int argc, char** argv) { bPoint = new B(argc, argv); } The static member should be defin ...
  • 使用构造函数初始值设定项列表: B() : arrayOfA{A(1), A(2), A(3), A(4), A(5)} {} 我也建议将数组更改为std::array 。 如果这不是C ++ 11,恐怕如果没有A的默认构造函数,就无法初始化成员。 然而,仍然有可能让你自己(这不难)或使用boost::array 。 在这种情况下,我不确定是否可以直接初始化数组,但它绝对是带有辅助函数的。 With a constructor initializer list: B() : arrayOfA{A(1), ...
  • 如果您有VS2013或其他现代编译器: A():min {false}, max {true} { } 避免这个问题因为min(a,b)是一个函数式宏而且{无法启动它的参数列表。 这是初始化列表特有的,所以我重新打开了这个问题。 “重复”建议在表达式上下文中使用宏,这在根本上是不同的 - 你可以在那里使用(min) 。 If you have VS2013 or another modern compiler: A():min {false}, max {true} { } avoids the pro ...
  • 不管怎么说,这不会编译,我不认为。 但无论哪种方式,如果你没有初始化它,该值将获得int的默认值。 相当于: int? var1 = null; int var2 = 2; int var3 =5; var t = new Test { Test1 = var1.GetValueOrDefault(), Test2 = var2, Test3 = var3 }; That wouldn't compile a ...
  • Mat2D(int rows, int cols, const T& initValue) :Mat2D(rows, cols) 这可能不起作用,因为初始化列表仅用于变量。 试试吧 Mat2D(int rows, int cols, const T& initValue) :_rows(rows), _cols(cols) 或者复制此函数中Mat2D(int cols, int rows)构造函数的内容。 Mat2D(int rows, int cols, const T& initVa ...
  • 从理论上讲,没有什么能阻止C ++设计者让你跳过val成员定义中的类型。 实际上,编译器已经知道了类型,并且看起来像赋值的语法在函数外部不是有效的,因此没有什么可以阻止编译器实现这种方法。 但是,这会使解析器更复杂,因为必须根据上下文对相同的构造(赋值)进行不同的解释。 换句话说,同一条线 TEST::val = 1; 意味着功能内外完全不同的东西。 在函数内部使用时,该行将被视为赋值; 当在函数外部使用时,相同的行将被视为定义。 为了让生活变得更简单,无论是对于他们自己还是语言的用户,设计师都决定使用熟 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)