当前位置: 首页 > news >正文

在线构建网站企业取名字

在线构建网站,企业取名字,购物网站开发jdk,wordpress 比较大家好#xff0c;本文将围绕python作业提交什么文件展开说明#xff0c;python123怎么提交作业是一个很多人都想弄明白的事情#xff0c;想搞清楚python期末作业程序需要先了解以下几个事情。 火车头采集ai伪原创插件截图#xff1a; I have a python project, whose fold…大家好本文将围绕python作业提交什么文件展开说明python123怎么提交作业是一个很多人都想弄明白的事情想搞清楚python期末作业程序需要先了解以下几个事情。 火车头采集ai伪原创插件截图 I have a python project, whose folder has the structure main_directory - lib - lib.py - run - .py .py is from lib.lib import add_two spark SparkSession \ .builder \ .master(yarn) \ .appName() \ .getOrCreate() print(add_two(1,2)) and lib.py is def add_two(x,y): return xy I want to launch as a Dataproc job in GCP. I have checked online, but I have not understood well how to do it. I am trying to launch the with gcloud dataproc jobs submit pyspark --cluster$CLUSTER_NAME --region$REGION \ run/.py But I receive the following error message: from lib.lib import add_two ModuleNotFoundError: No module named lib.lib Could you help me on how I should do to launch the job on Dataproc? The only way I have found to do it is to remove the absolute path, making this change to .py: from lib import add_two and the launch the job as gcloud dataproc jobs submit pyspark --cluster$CLUSTER_NAME --region$REGION \ --files /lib/lib.py \ /run/.py However, I would like to avoid the tedious process to list the files manually every time. Following the suggestion of Igor, to pack in a zip file I have found that zip -j --update -r libpack.zip /projectfolder/* spark-submit --py-files libpack.zip /projectfolder/run/.py works. However, this puts all files in the same root folder in libpack.zip, so if there were files with the same names in subfolders this would not work. Any suggestions? 解决方案 To zip the dependencies - cd base-path-to-python-modules zip -qr deps.zip ./* -x .py Copy deps.zip to hdfs/gs. Use uri when submitting the job as shown below. Submit a python project (pyspark) using Dataproc Python connector from google.cloud import dataproc_v1 from google.cloud.dataproc_v1.gapic.transports import ( job_controller_grpc_transport) region cluster_name project_id job_transport ( job_controller_grpc_transport.JobControllerGrpcTransport( address{}-dataproc.googleapis.com:443.format(region))) dataproc_job_client dataproc_v1.JobControllerClient(job_transport) job_file # command line for the main job file args [args1, arg2] # required only if main python job file has imports from other modules # can be one of .py, .zip, or .egg. addtional_python_files [hdfs://path/to/deps.zip, gs://path/to/moredeps.zip] job_details { placement: { cluster_name: cluster_name }, pyspark_job: { main_python_file_uri: job_file, args: args, python_file_uris: addtional_python_files } } res dataproc_job_client.submit_job(project_idproject_id, regionregion, jobjob_details) job_id res.reference.job_id print(fSubmitted dataproc job id: {job_id})
http://www.yutouwan.com/news/213314/

相关文章:

  • h5网站开发工具有哪些网站建站专业
  • 网站建设多少钱需要excel做网站页面布局
  • 地方网站域名选择wordpress 自动超链接
  • 网站安全建设步骤网页设计学校网站制作
  • 企业网站策划大纲模板html网页设计模板和源代码
  • 哪个公司做网站推广最好dw做网站时怎么改为绝对路径
  • 旅游网站建设建议中山建站服务
  • 珠海企业网站设计公司做会计需要了解的网站及软件
  • 怎么制作营销网站开发者模式开着好不好
  • 网站源码客户网站设计公司 上海
  • 一站式做网站费用动漫制作专业累吗
  • 找人做网站一般要多少钱象山县建设局网站
  • 南京建设企业网站推广软文300字范文
  • 手机网站 扁平化趋势网站建设售后服务合同
  • 黑龙江建设网官方网站特种作业python3 网站建设
  • 建网站和建网页的区别wordpress仿北京时间
  • 贵阳网站建设多钱钱线上推广费用预算
  • 做网站 域名 网站 空间wordpress 访客 用户
  • 做网站怎么优化wordpress 缓慢
  • 做网站jw100商务网站是什么
  • 卫生监督 网站建设方案现在还有人做网站吗
  • 做盗版视频网站吗企业网站制作报价单
  • 能用pinduoduo做网站吗极速微网站建设cms
  • 无锡公司做网站塘沽做网站公司
  • 制作logo免费网站微网站建设开发
  • 电子商务网站建设题库及答案api快速开发平台
  • 德阳网站建设网站室内装修图片效果图
  • 怎么做超链接网站为wordpress创建一个ftp
  • 找人做网站毕业设计什么软件可以做图片设计
  • 什么是网站流量优化甜品网站策划与建设