Tag: amazon emr

从Eclipse在AWS-EMR上运行MapReduce作业

我在Eclipse中有WordCount MapReduce示例。 我将它导出到Jar,并将其复制到S3。 然后我在AWS-EMR上运行它。 成功。 然后,我阅读了这篇文章 – http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-common-programming-sample.html它展示了如何使用AWS-EMR Api来运行MapReduce作业。 它仍假设您的MapReduce代码打包在Jar中。 我想知道是否有一种方法可以直接在AWS-EMR上从Eclipse运行MapReduce代码,而无需将其导出到Jar。

Spark SQL失败,因为“常量池已超过JVM限制0xFFFF”

我在EMR 4.6.0 + Spark 1.6.1上运行此代码: val sqlContext = SQLContext.getOrCreate(sc) val inputRDD = sqlContext.read.json(input) try { inputRDD.filter(“`first_field` is not null OR `second_field` is not null”).toJSON.coalesce(10).saveAsTextFile(output) logger.info(“DONE!”) } catch { case e : Throwable => logger.error(“ERROR” + e.getMessage) } 在saveAsTextFile的最后一个阶段,它失败并显示以下错误: 16/07/15 08:27:45 ERROR codegen.GenerateUnsafeProjection: failed to compile: org.codehaus.janino.JaninoRuntimeException: Constant pool has grown past JVM limit of 0xFFFF […]

hdfs中的文件路径

我想从Hadoop文件系统中读取该文件。 为了实现文件的正确路径,我需要hdfs主机名和端口地址。 所以最后我的文件路径看起来像 Path path = new Path(“hdfs://123.23.12.4344:9000/user/filename.txt”) 现在我想知道提取HostName =“123.23.12.4344”和端口:9000? 基本上,我想访问Amazon EMR上的FileSystem但是,当我使用时 FileSystem fs = FileSystem.get(getConf()); 我明白了 当你应该调用FileSystem.get(uri,conf)来获取支持你的路径的文件系统时,你可能会调用FileSystem.get(conf) 所以我决定使用URI。 (我必须使用URI)但我不知道如何访问URI。