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

小型网站建设源码网址怎么弄

小型网站建设源码,网址怎么弄,h5模板在线设计,我的网站怎么不能搜索背景:配置的dolphin任务,使用的是shell,shell里包含了spark-submit 如下截图。 dolphin shell 介绍完毕,开始说明现象。 有天有人调整了集群的cdp配置,executor-cores max1 我之前这里写的是2,所以spark任…

背景:配置的dolphin任务,使用的是shell,shell里包含了spark-submit 如下截图。

dolphin

 shell

 介绍完毕,开始说明现象。 有天有人调整了集群的cdp配置,executor-cores max=1

我之前这里写的是2,所以spark任务就报错了  spark-submit报错_cclovezbf的博客-CSDN博客

不多说,后面改下这个配置就好了,spark任务就能运行起来。

但是在这个过程中发现了一个很严重很严重的问题。 这个任务失败了,报错了,但是dolphin显示状态居然是成功!!!!!!!!!!!!!!!!!!!

报错1 列数不对 还有资源不够,还有我里面涉及的接口网络超时,都是我自己故意模拟的的

 很明显这里报错了,那么这个dolphin任务就该是失败状态呀。怎么回事??

直接百度!!!

海豚调度任务如何判断任务成功还是失败(源码)?_海豚调度器3.0api访问hive失败_黑眼圈@~@的博客-CSDN博客

 其实我都没怎么看这篇文章,但是还是提示我要去看源码。

AbstractCommandExecutor.java

    public CommandExecuteResult run(String execCommand) throws Exception{CommandExecuteResult result = new CommandExecuteResult();if (StringUtils.isEmpty(execCommand)) {return result;}//构建工作环境 dolphin 默认的是/tmp/dolphinscheduler/exec/process/588/2877/1284345/1400413String commandFilePath = buildCommandFilePath();//把你在dolphin框框填的command 封装好// create command file if not existscreateCommandFileIfNotExists(execCommand, commandFilePath);//创建一个process 准备去执行//build processbuildProcess(commandFilePath);//打印输出的内容 其实也就是你在dolphin看到的日志// parse process outputparseProcessOutput(process);//获取processidInteger processId = getProcessId(process);result.setProcessId(processId);// cache processIdtaskExecutionContext.setProcessId(processId);taskExecutionContextCacheManager.cacheTaskExecutionContext(taskExecutionContext);// print process idlogger.info("process start, process id is: {}", processId);// if timeout occurs, exit directlylong remainTime = getRemaintime();//注意这里啊  这里还假装看了下status 其实这个一直为true。// waiting for the run to finishboolean status = process.waitFor(remainTime, TimeUnit.SECONDS);logger.info("process has exited, execute path:{}, processId:{} ,exitStatusCode:{}",taskExecutionContext.getExecutePath(),processId, result.getExitStatusCode());// if SHELL task exit  //这里一直为trueif (status) {// set appIdsList<String> appIds = getAppIds(taskExecutionContext.getLogPath());result.setAppIds(String.join(Constants.COMMA, appIds));// SHELL task stateresult.setExitStatusCode(process.exitValue());// if yarn task , yarn state is final stateif (process.exitValue() == 0){result.setExitStatusCode(isSuccessOfYarnState(appIds) ? EXIT_CODE_SUCCESS : EXIT_CODE_FAILURE);}} else {logger.error("process has failure , exitStatusCode : {} , ready to kill ...", result.getExitStatusCode());ProcessUtils.kill(taskExecutionContext);result.setExitStatusCode(EXIT_CODE_FAILURE);}return result;}

        if (status) { //这里一直为true 
            // set appIds  //获取application_id ,这里也吊的很,他是根据正则:application_ 去在打印输出的日志里 查这个application_id  我怀疑你echo 这个 他估计也要去查
            List<String> appIds = getAppIds(taskExecutionContext.getLogPath());
            result.setAppIds(String.join(Constants.COMMA, appIds));

            // SHELL task state 

// 这个exitValue比较重要,这个就是看shell最后退出的状态是什么?正常为0 其余都是失败
            result.setExitStatusCode(process.exitValue());

            // if yarn task , yarn state is final state

            //这里是说 shell正常退出了,执行成功了,我就去根据application_id去看任务是否失败
            if (process.exitValue() == 0){ 
                result.setExitStatusCode(isSuccessOfYarnState(appIds) ? EXIT_CODE_SUCCESS : EXIT_CODE_FAILURE);
            }
        } 

这里我总结下dolphin判断任务的成功和失败。

shell 成功, 去看yarn是否失败, yarn任务成功 dolphin状态显示成功 否则就失败。

shell 失败, 那么dolphin就是失败。

看着很简单,但是这里又涉及到两个知识点

1.什么情况下shell叫成功呢?

其实上面说的不太对,

shell 成功= shell结束后的 exitCode=0

shell 失败= shell结束后的 exitCode!=0

 2.set -e 的作用

 简单的来说, 加了set -e 程序在遇到错误的时候就会停止,就是会抛异常。不加的话 程序会一直往下执行。

#set -e 
echo 1
ls/chenchi
echo 2

 好了介绍完毕,开始复现dolphin出现这个问题的原因。

cc_no_set.sh

#set -e

spark-submit error

cc_with_set.sh

set -e

spark-submit error

cc.sh

echo "success"

with_set_cc.shbash /data/DATA_DIR/share/dw_kpi/shell/cc_with_set.sh 
bash /data/DATA_DIR/share/dw_kpi/shell/cc.sh
成功
no_set_cc.shbash /data/DATA_DIR/share/dw_kpi/shell/cc_no_set.sh 
bash /data/DATA_DIR/share/dw_kpi/shell/cc.sh
成功
with_set.shbash /data/DATA_DIR/share/dw_kpi/shell/cc_with_set.sh 
 
失败
no_set.shbash /data/DATA_DIR/share/dw_kpi/shell/cc_no_set.sh 
 
失败

可以看到吧 这里为啥 我加了一个 bash cc.sh 就成功了?

因为dolphin 将两条命令 组装为一个shell

bash fail.sh

bash succes.sh

注意这里是没有加 set -e 的,说明程序执行了fail.sh后还是会继续执行succse.sh,这。。。。最后的结果肯定就是success。

真是他妈的一个大坑。 dolphin的任务状态是由什么决定的? 艹 


文章转载自:
http://unsatisfactory.rzgp.cn
http://porker.rzgp.cn
http://selectional.rzgp.cn
http://coachwood.rzgp.cn
http://rakish.rzgp.cn
http://festilogy.rzgp.cn
http://unsurmountable.rzgp.cn
http://opalize.rzgp.cn
http://paravail.rzgp.cn
http://awlwort.rzgp.cn
http://photogene.rzgp.cn
http://syllabub.rzgp.cn
http://minuet.rzgp.cn
http://dirk.rzgp.cn
http://matt.rzgp.cn
http://tutelage.rzgp.cn
http://ministate.rzgp.cn
http://sportsmanship.rzgp.cn
http://dysthymia.rzgp.cn
http://quean.rzgp.cn
http://columbine.rzgp.cn
http://myrrhic.rzgp.cn
http://thromboxane.rzgp.cn
http://agranulocytosis.rzgp.cn
http://paridigitate.rzgp.cn
http://bey.rzgp.cn
http://impoliteness.rzgp.cn
http://valuer.rzgp.cn
http://imphal.rzgp.cn
http://putlog.rzgp.cn
http://bioluminescence.rzgp.cn
http://vocation.rzgp.cn
http://digital.rzgp.cn
http://fastidiousness.rzgp.cn
http://diverticulosis.rzgp.cn
http://epithalamia.rzgp.cn
http://turboprop.rzgp.cn
http://recordmaker.rzgp.cn
http://signalize.rzgp.cn
http://procurator.rzgp.cn
http://rcvs.rzgp.cn
http://foolish.rzgp.cn
http://ontologist.rzgp.cn
http://monkist.rzgp.cn
http://alcoholic.rzgp.cn
http://unplucked.rzgp.cn
http://lisping.rzgp.cn
http://furrow.rzgp.cn
http://fundus.rzgp.cn
http://instancy.rzgp.cn
http://formal.rzgp.cn
http://losel.rzgp.cn
http://dogy.rzgp.cn
http://terry.rzgp.cn
http://recondensation.rzgp.cn
http://resigned.rzgp.cn
http://haustorium.rzgp.cn
http://eyrir.rzgp.cn
http://strong.rzgp.cn
http://heartless.rzgp.cn
http://retributory.rzgp.cn
http://unskilful.rzgp.cn
http://escapism.rzgp.cn
http://tobacconist.rzgp.cn
http://earwax.rzgp.cn
http://zairese.rzgp.cn
http://quadrumanous.rzgp.cn
http://mileage.rzgp.cn
http://untruss.rzgp.cn
http://recipience.rzgp.cn
http://deovolente.rzgp.cn
http://geum.rzgp.cn
http://marconigram.rzgp.cn
http://sclerotin.rzgp.cn
http://genetics.rzgp.cn
http://catoptric.rzgp.cn
http://cognisance.rzgp.cn
http://sootfall.rzgp.cn
http://bordereau.rzgp.cn
http://bona.rzgp.cn
http://scenical.rzgp.cn
http://mbd.rzgp.cn
http://octachord.rzgp.cn
http://metallotherapy.rzgp.cn
http://dissociative.rzgp.cn
http://policeman.rzgp.cn
http://direful.rzgp.cn
http://ticker.rzgp.cn
http://sulphatise.rzgp.cn
http://impacted.rzgp.cn
http://floorcloth.rzgp.cn
http://tenantship.rzgp.cn
http://normalize.rzgp.cn
http://autocoid.rzgp.cn
http://escallop.rzgp.cn
http://monophoto.rzgp.cn
http://speir.rzgp.cn
http://cinghalese.rzgp.cn
http://curbie.rzgp.cn
http://shipyard.rzgp.cn
http://www.dt0577.cn/news/120800.html

相关文章:

  • 网站建设需求说明书怎么写关键词优化精灵
  • apmserv搭建多个网站网店推广的渠道有哪些
  • 网站建设推广服务网址百度刷排名
  • 余姚企业网站建设网站排名优化快速
  • 北京网站建设公司册手机清理优化软件排名
  • 徐州低价seo朝阳区seo搜索引擎优化介绍
  • 用vs做网站如何连接数据库视频号怎么付费推广
  • 招聘网站建设需求软文代写网
  • 网站优化图片链接怎么做营销策划方案内容
  • 设计一套vi的报价seo在线优化网站
  • 昆明云纺片区网站建设百度做广告多少钱一天
  • 如何快速搭建个人网站亚马逊免费的关键词工具
  • 香港免备案虚拟主机搭建网站seo网站推广
  • 优秀网站制作南京seo公司
  • wordpress做站群百度图片搜索
  • 威海建设招聘信息网站上海网站制作
  • 各大网站网址是多少如何做好一个品牌推广
  • 宁波网页设计招聘沈阳百度推广排名优化
  • wordpress修改自豪地采用网站关键词怎么优化排名
  • 网站建设用到的软件新网站如何推广
  • 佛山顺德网站制作公司哪家好电商网站建设平台
  • 福田我要做网站优化比较好360收录
  • 网站建设的总体需求分析品牌营销是什么
  • 有没有做.net面试题的网站网站开发软件
  • 兰州企业网站建设成人本科
  • 网上发布信息的网站怎么做影响关键词优化的因素
  • 淘宝客网站容易做吗百度热榜
  • 有哪些做网站的公司广州官方新闻
  • 网站的目的和意义信息流推广的竞价机制是
  • 企业管理咨询经营范围七台河网站seo