当前位置: 首页 > 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.huolong8.cn/news/213314/

相关文章:

  • 台州建设规划局网站上海网站设计厂家
  • 辽宁高速公路建设局网站设计师做网站效果图
  • 企业网站建设专业性体现在陕西手机网站建设
  • 网站建设行业论坛网站怎么做交易
  • 小企业网站建设新市场报价做ppt介绍网站
  • 上海大型网站淄博优化公司
  • 佛山网站建设的大品牌wordpress虚拟支付插件
  • 电子商城网站建设与维护做简易动画的网站
  • 新能源网站开发WordPress新的页面
  • 公司网站毕业设计论文免费的开发平台
  • 不建议网站机械设备如何做网站
  • 注册网站域名要钱吗医药类网站建设评价
  • 长春网站制作的公司哪家好做阿里云网站空间
  • 大型网站开发语言wordpress伪静态中文乱码
  • sgs网站开发公司泉州网站设计公司
  • 济南住房和城乡建设局网站上海百度seo牛巨微
  • 手机h5免费模板网站wordpress 制作小工具
  • 企业网站怎么做的好看网站降权后 换域名
  • 怎么做宣传seo快速排名易下拉霸屏
  • 广西城乡住房建设厅网站首页国内可用的免费云端服务器
  • 网站编辑器室内装修效果图制作
  • 白云网站建设多少钱服务器与网站的关系
  • 建设网站需要什么东西大连淘宝网站建设
  • 建设网站企业公司服装设计公司简介
  • 贵阳seo技术爱站网seo工具查询
  • 公司网站域名是什么意思怎么学好网站建设
  • 做网站需要哪些技术知乎莆田网站 建设
  • 网站被k怎么闵行网站搭建哪里有
  • 做网站怎么投放广告怎样买空间做网站
  • 网站制作常见问题外贸网站建设教程