|
|
|
@ -17,6 +17,7 @@ import com.platform.kubernetes.SimpleKubeClient;
|
|
|
|
|
import com.platform.oracle.OracleConnector;
|
|
|
|
|
import com.platform.service.IOracleExtractService;
|
|
|
|
|
import com.platform.service.OracleExtractHelper;
|
|
|
|
|
import com.platform.utils.Configs;
|
|
|
|
|
import com.platform.utils.Constant;
|
|
|
|
|
|
|
|
|
|
@Service(value = "OracleExtract")
|
|
|
|
@ -69,7 +70,12 @@ public class OracleExtractServiceImpl implements IOracleExtractService {
|
|
|
|
|
// "isExtract", "1"); //更新oracle汇总状态,0标示为未汇总,1标示汇总中,2标示汇总完成
|
|
|
|
|
String cmd = "kubectl label --overwrite rc "
|
|
|
|
|
+ collectOracle.getName() + " isExtract=1";
|
|
|
|
|
Constant.ganymedSSH.execCmdWaitAcquiescent(cmd);
|
|
|
|
|
List<String> rList = Constant.ganymedSSH
|
|
|
|
|
.execCmdWaitAcquiescent(cmd);
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
|
|
for (String string : rList)
|
|
|
|
|
sb.append(string).append("\n");
|
|
|
|
|
Configs.CONSOLE_LOGGER.info(sb.toString());
|
|
|
|
|
oracleExtract.createDBLink(conn, collectOracle); // 创建dblink
|
|
|
|
|
oracleExtract.createTableSpace(conn, oracleModel); // 创建表空间
|
|
|
|
|
oracleExtract.createUser(conn, collectOracle, oracleModel);// 创建用户并授权
|
|
|
|
@ -77,8 +83,12 @@ public class OracleExtractServiceImpl implements IOracleExtractService {
|
|
|
|
|
// client.updateOrAddReplicasLabelById(collectOracle.getName(),
|
|
|
|
|
// "isExtract", "1"); //更新oracle汇总状态,0标示为未汇总,1标示汇总中,2标示汇总完成
|
|
|
|
|
cmd = "kubectl label --overwrite rc "
|
|
|
|
|
+ collectOracle.getName() + " isExtract=1";
|
|
|
|
|
Constant.ganymedSSH.execCmdWaitAcquiescent(cmd);
|
|
|
|
|
+ collectOracle.getName() + " isExtract=2";
|
|
|
|
|
rList = Constant.ganymedSSH.execCmdWaitAcquiescent(cmd);
|
|
|
|
|
sb = new StringBuffer();
|
|
|
|
|
for (String string : rList)
|
|
|
|
|
sb.append(string).append("\n");
|
|
|
|
|
Configs.CONSOLE_LOGGER.info(sb.toString());
|
|
|
|
|
data.setExtractStatus(2);
|
|
|
|
|
dataInfoDao.updateExtract(data);
|
|
|
|
|
}
|
|
|
|
|