scala的REPL shell的调用】的更多相关文章

最近突然对spark的spark-shell发生了兴趣 它是如何启动scala的REPL的,并且在此前写入了常用的环境变量的呢? 通过查看spark的源码,找到了SparkILoop.scala import scala.tools.nsc.interpreter.{JPrintWriter, ILoop} /** * A Spark-specific interactive shell. */ class SparkILoop(in0: Option[BufferedReader], out:…
为了更方便的查询并产生报表, 需要使用shell脚本调用spark-sql spark/bin/spark-sql --master spark://host:7077 -f ${SQL_FILE} > ${OUT_FILE}…
今天上午在写一个需求,要求的比较急,要求当天完成,我大致分析了一下,可以采用从shell脚本中插入一连串的日期,通过调用proc生成的可执行文件,将日期传入后台数据库,在数据库中进行计算.需要切分日期的字符串,转化成整数,插入int 数组中,手工实现太慢,就直接借用系统的strstr函数来用了. 场景模拟: 1. shell脚本: #diao.sh #!/bin/bash date1="20170622,20170623,20170626,20170627,20170628,20170629,2…
今天上午在写一个需求,要求的比较急,要求当天完成,我大致分析了一下,可以采用从shell脚本中插入一连串的日期,通过调用proc生成的可执行文件,将日期传入后台数据库,在数据库中进行计算.需要切分日期的字符串,转化成整数,插入int 数组中,手工实现太慢,就直接借用系统的strtok函数来用了. 场景模拟: 1. shell脚本: #diao.sh #!/bin/bash date1="20170622,20170623,20170626,20170627,20170628,20170629,2…
shell中调用R语言并传入参数的两种方法 第一种: Rscript myscript.R R脚本的输出 第二种: R CMD BATCH myscript.R # Check the output cat myscript.Rout 调用R脚本的全部控制台log 传入参数: 在脚本中add args<-commandArgs(TRUE) 然后shell中: Rscript myscript.R arg1 arg2 arg3 注意取出来的参数是所有参数连在一起的character…
shell中调用jenkins API批量运行jenkins带参数的任务: #!/bin/sh #startdate=20150127 startdate=20150201 while [ "$startdate" -ge "20131011" ]; do url="http://192.168.53.100:8099/jenkins/job/temp_pv_is_pay_film_vipuv_unvipuv_day/buildWithParameters…
1. shell 获得调用的python脚本的print值 python test.py > out.log 2.shell 获得调用的python脚本的错误log python test.py > "err.txt"…
Shell脚本调用ftp上传文件 1.脚本如下 ftp -n<<! open x.x.x.x ###x.x.x.x为ftp地址 user username password ###username为ftp用户名 password为用户名密码 binary ###binary为二进制传输 cd /report ###切换到ftp目录 lcd /home/oracle/report/export ###切换到本地linux目录 prompt put report_data_`date +%Y%m%…
Shell脚本调用SQL文格式 1. 定义需要执行的SQL文,以及需要输出文件 OUTFILE=\${DATADIR}/\${FILENAME} SQLFILE=\${DATADIR}/check_tradedetail.sql 2. 设置需要执行的SQL文 echo -n " select tr.id || ',' || m.merchant_code || ',' || m.merchant_name || ',' || to_char(tr.trade_start_time, 'yyyy-…
(实战项目应用) 1. 下载Miniconda 两个安装方式: 方式1:wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh 方式2:选择下载安装包 "Miniconda3-py37_4.8.2-Linux-x86_64.sh" 2. 安装Miniconda 安装过程默认:具体过程为:yes->enter(回车)->yes 3. 检…