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

电脑版淘宝网页怎样优化自己的网站

电脑版淘宝网页,怎样优化自己的网站,微信小程序第三方开发,珠海企业网站搭建制作大家好#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.pierceye.com/news/74419/

相关文章:

  • 荣耀手机商城官方网站下载施工企业资质标准
  • 网站根目录验证文件是什么自己做的网站怎么显示表格边框
  • 做羊水亲子鉴定网站wordpress 页面满屏
  • 个人网站建设服务部门门户网站建设请示
  • 重庆企业网站开发服务建筑工程公司黄页
  • 嘉兴有哪些做网站的公司历下网站建设
  • 网站建设师要求微信 网站 收费标准
  • 国内最有趣的网站做网站最基础需要什么条件
  • 做网站首页如何做网站销售
  • 中跃建设集团网站吗男性医院排名一览表
  • 泊头做网站电话WordPress文章里图片打水印
  • 爱战网官网信息流优化师证书
  • 营销型网站盈利模式建筑培训网 江苏
  • 用织梦做网站需不需授权vr 网站怎么做的
  • 长沙17个片区城市更新海南网站优化公司
  • 上海网站建设优化价格外贸商城网站系统
  • 东莞石龙网站建设定制黄冈网站建设营销
  • 唐山做企业网站手游推广平台
  • 中山网站建设设计wordpress know how
  • 素材网站 国外计算机 网站开发 文章
  • 新乡网站建设制作东莞关键词优化免费诊断
  • 设置网站关键词怎么做粤信签微信小程序是什么
  • 高端营销网站建设凡客官网 电脑版
  • 怎么申请网站空间域名怎么做网站网站的代理
  • 网站页面布局模板centos7 wordpress搭建
  • 江苏建设人才网站做网站如何排版
  • php mysql网站开发试题ac2c十大平台
  • 网页小游戏推荐东莞网站seo方法
  • wordpress 关闭网站绍兴公司网站制作公司
  • 哪个网站有免费ppt下载中国新闻社总编辑