对于一个项目,我们正在尝试扩展Google Cloud Datalab并将修改后的版本部署到Google云平台.据我了解,部署过程通常包括以下步骤:
container参数与谷歌云部署到指定正确的码头工人的形象,说明这里.由于默认的容器注册表,即gcr.io/cloud_datalab/datalab:<tag>非Datalab贡献者的禁止,我们将Docker镜像推送到我们自己的容器注册表,即gcr.io/<project_id>/datalab:<tag>.
但是,Google Cloud部署程序仅直接从gcr.io/cloud_datalab/datalab:<tag>(使用container参数指定的标记)提取,并且似乎不允许指定源容器注册表.部署者似乎不是开源的,使我们无法将我们的图像部署到Google Cloud.
我们已经研究过创建类似于此处列出的示例的自定义部署,但这从未启动Datalab,因此我们怀疑启动脚本更复杂.
问题:我们如何将Datalab图像从我们自己的容器注册表部署到Google Cloud?
提前谢谢了.
我正在尝试使用ftp在Apache Spark(Scala版本)中的远程计算机上读取文件.目前,我已经在GitHub上关注Databricks的Learning Spark回购中的一个例子.使用curl,我可以下载文件,因此我使用的路径存在.
下面是我尝试执行的代码片段:
var file = sc.textFile("ftp://user:pwd/192.168.1.5/brecht-d-m/map/input.nt")
var fileDF = file.toDF()
fileDF.write.parquet("out")
Run Code Online (Sandbox Code Playgroud)
在尝试对数据帧执行计数后,我得到以下stacktrace(http://pastebin.com/YEq8c2Hf):
org.apache.spark.sql.catalyst.errors.package$TreeNodeException: execute, tree:
TungstenAggregate(key=[], functions=[(count(1),mode=Final,isDistinct=false)], output=[count#1L])
+- TungstenExchange SinglePartition, None
+- TungstenAggregate(key=[], functions=[(count(1),mode=Partial,isDistinct=false)], output=[count#4L])
+- Project
+- Scan ExistingRDD[_1#0]
...
Caused by: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: ftp://user:pwd@192.168.1.5/brecht-d-m/map/input.nt
Run Code Online (Sandbox Code Playgroud)
我会假设该文件无法访问,但这与我能够通过curl检索文件相矛盾:
curl ftp://user:pwd@192.168.1.5/brecht-d-m/map/input.nt
Run Code Online (Sandbox Code Playgroud)
这将打印出终端上的特定文件.我没有看到我在Scala代码中做错了什么.我在上面给出的代码片段中是否有错误,或者该代码是完全错误的?
先谢谢,布莱希特
注意:
指定整个路径(/home/brecht-dm/map/input.nt)也不起作用(正如预期的那样,因为这在curl中也不起作用;"服务器拒绝您更改到给定目录").在Spark中尝试这个,给出了不支持seek的IOException(http://pastebin.com/b9EB9ru2).
在本地工作(例如sc.textFile("/ home/brecht-dm/map/input.nt"))完美地工作.
对于所有用户,特定文件的文件权限设置为R + W.
文件大小(15MB)不应该是一个问题,它应该能够处理更大的文件.
软件版本:Scala 2.11.7,Apache Spark 1.6.0,Java 1.8.0_74,Ubuntu 14.04.4
In Java Swing it is possible to put a menu on the right side of the menu bar using:
menubar.add(menu1);
menubar.add(Box.createHorizontalGlue());
menubar.add(menu2);
Run Code Online (Sandbox Code Playgroud)
This will put menu1 on the left and menu2 on the right. This function is (obviously) not available in JavaFX.
In JavaFX, I have seen that the same can be achieved for a toolbar using:
final Pane rightSpacer = new Pane();
HBox.setHgrow(
rightSpacer,
Priority.SOMETIMES
);
Run Code Online (Sandbox Code Playgroud)
Although, this workaround is not usuable for menus.
Question: is …