default_container_executor_session.sh是如何生成的
时间: 2023-11-29 14:03:49 浏览: 32
default_container_executor_session.sh是由Apache Hadoop YARN框架的源代码生成的。在Hadoop YARN中,这个脚本是用于启动和管理容器的,容器是在YARN集群中运行的任务实例。这个脚本包含了所有必要的命令和参数来启动一个容器,包括环境变量、Java命令、JVM参数等等。它是通过编译源代码和执行相应的构建命令生成的,具体的生成过程可以参考Hadoop YARN的开发文档。
相关问题
default_container_executor_session.sh: line 5: exec: setsid: not found
这个问题可能是因为您的系统缺少了setsid这个命令,导致脚本无法正常执行。您可以尝试在终端中输入命令“which setsid”来查看是否已经安装了该命令。如果没有安装,您可以通过安装util-linux包来解决这个问题。具体方法取决于您使用的Linux发行版,您可以在终端中输入“sudo apt-get install util-linux”或“yum install util-linux”等命令进行安装。如果您已经安装了util-linux包,但仍遇到这个问题,可能是因为PATH环境变量不正确,您可以尝试在脚本中使用绝对路径来执行setsid命令。
改如何修正: <select id="getCurrentTask" resultType="com.sottop.sokonmobile.sokonmobile.qingdao.entity.AsEmWorkOrderEntity"> SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE to_char(asewo.plan_start_time_T,'yyyy_mm-dd hh24:mi') <= to_char(plan_finish_time_T,'yyyy_mm_dd hh24:mi') AND asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=#{executor} <if test="orderType!=null and orderType!=''"> AND asewo.order_type_s=#{orderType} </if> ORDER BY asewo.creation_time DESC Union All SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=#{executor} <if test="orderType!=null and orderType!=''"> AND asewo.order_type_s=#{orderType} </if> ORDER BY asewo.creation_time DESC </select>
根据您提供的信息,似乎这个SQL语句存在一些问题,包括:
1. 在第一行的resultType中,应该使用全限定类名而非实体类名。
2. 在第6行的SQL语句中,应该使用小于等于(<=)而非HTML实体字符(<=)。
3. 在第18行和第30行的ORDER BY子句中,应该使用ORDER BY asewo.creation_time DESC,而非ORDER BY creation_time DESC。因为创建时间(creation_time)是AT_AS_EM_Work_Order表中的列,需要使用别名asewo来引用。
修正后的SQL语句如下所示:
```
<select id="getCurrentTask" resultType="com.sottop.sokonmobile.sokonmobile.qingdao.entity.AsEmWorkOrderEntity">
SELECT
asewo.code_s as code,
asewo.order_type_s as orderType,
asewo.equipment_name_s as equipmentName,
asewo.executor_s as executor,
asewo.plan_start_time_T as planStartTime,
asewo.plan_finish_time_T as planFinishTime,
asewo.tpm_key_s as tpmKey,
asewo.shop_s as shop,
asewo.line_S as line,
asewo.actual_start_time_t as startTime,
asewo.actual_finish_time_t as finishTime,
asewo.executor_account_s as executorAccounts,
asewo.source_type_s as sourceType,
asewo.SOURCE_ORDER_S as sourceOrder,
asewo.CREATION_TIME as creationTime
FROM AT_AS_EM_Work_Order asewo
WHERE to_char(asewo.plan_start_time_T,'yyyy_mm-dd hh24:mi') <= to_char(asewo.plan_finish_time_T,'yyyy_mm_dd hh24:mi')
AND asewo.ORDER_STATUS_S='创建'
AND asewo.executor_s=#{executor}
<if test="orderType!=null and orderType!=''">
AND asewo.order_type_s=#{orderType}
</if>
ORDER BY asewo.creation_time DESC
Union All
SELECT
asewo.code_s as code,
asewo.order_type_s as orderType,
asewo.equipment_name_s as equipmentName,
asewo.executor_s as executor,
asewo.plan_start_time_T as planStartTime,
asewo.plan_finish_time_T as planFinishTime,
asewo.tpm_key_s as tpmKey,
asewo.shop_s as shop,
asewo.line_S as line,
asewo.actual_start_time_t as startTime,
asewo.actual_finish_time_t as finishTime,
asewo.executor_account_s as executorAccounts,
asewo.source_type_s as sourceType,
asewo.SOURCE_ORDER_S as sourceOrder,
asewo.CREATION_TIME as creationTime
FROM AT_AS_EM_Work_Order asewo
WHERE asewo.ORDER_STATUS_S='创建'
AND asewo.executor_s=#{executor}
<if test="orderType!=null and orderType!=''">
AND asewo.order_type_s=#{orderType}
</if>
ORDER BY asewo.creation_time DESC
</select>
```