问题标签 [spark-notebook]

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 投票
3 回答
667 浏览

apache-spark - 如何在 MacOS X 上的 docker 上运行 spark-notebook?

在 OSX(通过 boot2docker)上使用 docker 运行 spark-notebook 似乎没有任何作用。这是输出

当我将浏览器指向http://localhost:9000时,它说该网页不可用。我错过了什么吗?是不是配置错误?

0 投票
1 回答
285 浏览

scala - Spark 笔记本工作表未使用 docker 保存

当我使用 docker 启动 spark-notebook 并创建一个新工作表时。下次我启动它时,工作表不在那里。

这是命令:

这是警告/信息:

这是配置错误还是其他问题?

编辑:

所以这个问题有几个方面。

  1. 当使用 ctrl-c 关闭正在运行的 docker 容器时,它实际上仍然存在。当我使用上面的命令重新运行它时,它会启动一个单独的新容器,该容器没有新创建的笔记本。

这可以通过查看正在运行的容器列表来缓解,使用docker ps找到正在运行的容器并使用 附加到它docker attach process_id。数据仍将存在。

  1. 使用已安装的卷来存储笔记本会导致权限问题。容器内挂载的目录只有所有者写权限,所有者为用户1000。spark-notebook 作为用户守护进程(用户 id 1)运行。

这是github 上有关此问题的长线程,但没有明确的解决方案。

0 投票
2 回答
4347 浏览

scala - How do I create a Spark RDD from Accumulo 1.6 in spark-notebook?

I have a Vagrant image with Spark Notebook, Spark, Accumulo 1.6, and Hadoop all running. From notebook, I can manually create a Scanner and pull test data from a table I created using one of the Accumulo examples:

will give the first ten rows of table data.

When I try to create the RDD thusly:

I get an RDD returned to me that I can't do much with due to the following error:

java.io.IOException: Input info has not been set. at org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.validateOptions(InputConfigurator.java:630) at org.apache.accumulo.core.client.mapreduce.AbstractInputFormat.validateOptions(AbstractInputFormat.java:343) at org.apache.accumulo.core.client.mapreduce.AbstractInputFormat.getSplits(AbstractInputFormat.java:538) at org.apache.spark.rdd.NewHadoopRDD.getPartitions(NewHadoopRDD.scala:98) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:222) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:220) at scala.Option.getOrElse(Option.scala:120) at org.apache.spark.rdd.RDD.partitions(RDD.scala:220) at org.apache.spark.SparkContext.runJob(SparkContext.scala:1367) at org.apache.spark.rdd.RDD.count(RDD.scala:927)

This totally makes sense in light of the fact that I haven't specified any parameters as to which table to connect with, what the auths are, etc.

So my question is: What do I need to do from here to get those first ten rows of table data into my RDD?

update one Still doesn't work, but I did discover a few things. Turns out there are two nearly identical packages,

org.apache.accumulo.core.client.mapreduce

&

org.apache.accumulo.core.client.mapred

both have nearly identical members, except for the fact that some of the method signatures are different. not sure why both exist as there's no deprecation notice that I could see. I attempted to implement Sietse's answer with no joy. Below is what I did, and the responses:

import org.apache.hadoop.mapred.JobConf import org.apache.hadoop.conf.Configuration jobConf: org.apache.hadoop.mapred.JobConf = Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml

Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml

rdd2: org.apache.spark.rdd.RDD[(org.apache.accumulo.core.data.Key, org.apache.accumulo.core.data.Value)] = HadoopRDD[1] at hadoopRDD at :62

java.io.IOException: Input info has not been set. at org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.validateOptions(InputConfigurator.java:630) at org.apache.accumulo.core.client.mapred.AbstractInputFormat.validateOptions(AbstractInputFormat.java:308) at org.apache.accumulo.core.client.mapred.AbstractInputFormat.getSplits(AbstractInputFormat.java:505) at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:201) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:222) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:220) at scala.Option.getOrElse(Option.scala:120) at org.apache.spark.rdd.RDD.partitions(RDD.scala:220) at org.apache.spark.rdd.RDD.take(RDD.scala:1077) at org.apache.spark.rdd.RDD.first(RDD.scala:1110) at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.(:64) at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.(:69) at...

* edit 2 *

re: Holden's answer - still no joy:

rddX: org.apache.spark.rdd.RDD[(org.apache.accumulo.core.data.Key, org.apache.accumulo.core.data.Value)] = NewHadoopRDD[0] at newAPIHadoopRDD at :58

Out[15]: NewHadoopRDD[0] at newAPIHadoopRDD at :58

java.io.IOException: Input info has not been set. at org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.validateOptions(InputConfigurator.java:630) at org.apache.accumulo.core.client.mapreduce.AbstractInputFormat.validateOptions(AbstractInputFormat.java:343) at org.apache.accumulo.core.client.mapreduce.AbstractInputFormat.getSplits(AbstractInputFormat.java:538) at org.apache.spark.rdd.NewHadoopRDD.getPartitions(NewHadoopRDD.scala:98) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:222) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:220) at scala.Option.getOrElse(Option.scala:120) at org.apache.spark.rdd.RDD.partitions(RDD.scala:220) at org.apache.spark.rdd.RDD.take(RDD.scala:1077) at org.apache.spark.rdd.RDD.first(RDD.scala:1110) at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.(:61) at

edit 3 -- progress!

i was able to figure out why the 'input INFO not set' error was occurring. the eagle-eyed among you will no doubt see the following code is missing a closing '('

as I'm doing this in spark-notebook, I'd been clicking the execute button and moving on because I wasn't seeing an error. what I forgot was that notebook is going to do what spark-shell will do when you leave off a closing ')' -- it will wait forever for you to add it. so the error was the result of the 'setConnectorInfo' method never getting executed.

unfortunately, I'm still unable to shove the accumulo table data into an RDD that's useable to me. when I execute

I get back

res15: Long = 10000

which is the correct response - there are 10,000 rows of data in the table I pointed to. however, when I try to grab the first element of data thusly:

I get the following error:

org.apache.spark.SparkException: Job aborted due to stage failure: Task 0.0 in stage 0.0 (TID 0) had a not serializable result: org.apache.accumulo.core.data.Key

any thoughts on where to go from here?

edit 4 -- success!

the accepted answer + comments are 90% of the way there - except for the fact that the accumulo key/value need to be cast into something serializable. i got this working by invoking the .toString() method on both. i'll try to post something soon that's complete working code incase anyone else runs into the same issue.

0 投票
2 回答
471 浏览

java - 通过 spark-notebook 填充 accumulo 1.6 突变对象时出现奇怪的错误

使用 spark-notebook 更新累积表。使用accumulo 文档accumulo 示例代码中指定的方法。以下是我在笔记本中逐字记录的内容,以及回复:

clientRqrdTble: org.apache.accumulo.core.cli.ClientOnRequiredTable = org.apache.accumulo.core.cli.ClientOnRequiredTable@6c6a18ed bwConfig: org.apache.accumulo.core.client.BatchWriterConfig = [maxMemory=52428800, maxLatency=120000, maxWriteThreads=3,超时=9223372036854775807] batchWriter: org.apache.accumulo.core.client.BatchWriter = org.apache.accumulo.core.client.impl.BatchWriterImpl@298aa736

rowIdS:字符串 = row_0736460000

突变:org.apache.accumulo.core.data.Mutation = org.apache.accumulo.core.data.Mutation@0

java.lang.IllegalStateException:在 org.apache.accumulo.core.data.Mutation.put( Mutation.java:163) 在 org.apache.accumulo.core.data.Mutation.put(Mutation.java:211)

我深入研究了代码,发现罪魁祸首是一个 if-catch,它正在检查 UnsynchronizedBuffer.Writer 缓冲区是否为空。行号不会对齐,因为这是与 1.6 accumulo-core jar 中的版本略有不同的版本 - 我已经查看了两者,但在这种情况下,不同之处并不重要。据我所知,该对象是在执行该方法之前创建的,并且没有被转储。

所以要么我在代码中遗漏了一些东西,要么有其他东西出现了。你们中有人知道可能导致这种行为的原因吗?

更新一

我已经使用 scala 控制台并通过直接的 java 1.8 执行了以下代码。它在 scala 中失败,但在 Java 中失败。在这一点上,我认为这是一个 Accumulo 问题。因此,我将打开一个 bug 票并深入挖掘源代码。如果我想出一个解决方案,我会在这里发布。

下面是Java形式的代码。那里有一些额外的东西,因为我想确保我可以连接到我使用 accumulo 批处理编写器示例创建的表:

更新二

已为此问题创建了Accumulo 错误票证。他们的目标是在 v1.7.0 中修复这个问题。在那之前,我在下面提供的解决方案是一种功能解决方法。

0 投票
1 回答
1589 浏览

apache-spark - 为什么 Hue 中的 Spark Notebook 会报告“Gateway timeout Error 504”?

我正在使用带有 Ambari 2.1.0 和 Hue 3.8.1、Ubuntu 12.04 的 Hadoop 2.2.6 迷你集群(1 个主集群和 3 个从属)。Spark 1.2.1(使用 Scala 2.10.3)作为 Ambari 设置的一部分安装。我已经安装了 Livy-Server 以便能够在 Hue 中使用 Spark Notebook。hue.ini 文件中的配置如下:

但是当我尝试在笔记本中输入简单的命令时,每次我都会遇到同样的错误:Gateway timeout Error 504. 当我使用以下命令从 shell 手动启动 Livy-Server 时:

我有其他文章中询问的结果,但没有解决方案:http: //gethue.com/new-notebook-application-for-spark-sql/#comment-56901 任何想法如何解决这个问题,甚至在哪里看?!除了 Spark Notebook 之外,其他应用程序都可以正常工作。我是大数据和 hadoop 的新手,正在阅读论坛寻找可能的解决方案,但没有找到与此问题相关的任何内容,是配置错误还是我在安装过程中遗漏了什么?任何帮助高度赞赏。谢谢

0 投票
2 回答
4836 浏览

apache-spark - 评估 Spark-Notebook

我正在评估 Spark Notebook,发现了三种不同的产品;1. Hue 3.9 自带 Spark notebook (beta) 2. Apache zeppelin 3. andypetrella/spark-notebook。

你能帮我了解每种产品的优缺点吗

谢谢帕尼

0 投票
0 回答
124 浏览

apache-spark - 启动 apache spark notebook 时出现 java.lang.IllegalArgumentException

当尝试运行 spark-notebook.bat 时,我收到以下异常:

tachyon 和 hadoop 是运行的必要条件吗?

是否有在 Windows 上运行的记录步骤?

0 投票
2 回答
1171 浏览

hive - 如何将 Spark-Notebook 连接到 Hive 元存储?

这是一个包含 Hadoop 2.5.0、Spark 1.2.0、Scala 2.10 的集群,由 CDH 5.3.2 提供。我使用了一个编译好的 spark-notebook 发行版

Spark-Notebook 似乎默认找不到 Hive 元存储。

如何hive-site.xml为 spark-notebook 指定位置以便它可以加载 Hive 元存储?

这是我尝试过的:

  1. 将包含 hive-site.xml 的 /etc/hive/conf 中的所有文件链接到当前目录

  2. 在 bash 中指定 SPARK_CONF_DIR 变量

0 投票
1 回答
219 浏览

apache-spark - 在 Bluemix 上执行 Apache Spark SQL 的作业的调度程序

我在 Bluemix 中使用 Apache Spark。我想为 sparksql 作业实现调度程序。我看到这个链接到一个描述日程安排的博客。但不清楚如何更新清单。也许还有其他方法可以安排我的工作。

0 投票
1 回答
158 浏览

apache-spark - Bluemix spark 服务错误:java.net.NoRouteToHostException

昨天,这段代码运行正常。但是今天我收到以下错误消息: