oracle抽取修改

web_backend_develope
chenlw 9 years ago
parent be9cfee203
commit 9556c4940a

@ -151,8 +151,8 @@ public class OracleExtractHelper {
* @param conn
* @param oc
*/
public void extractColleDB(Connection conn, OracleConnectorParams oc) {
String strTUser = oc.getName() + Configs.TABLE_SUFFIX;
public void extractColleDB(Connection conn, OracleConnectorParams oc, GatherOracleInfo totalOracle) {
String strTUser = oc.getName() + totalOracle.getSuffix();
String sql = "SELECT 'create table "
+ strTUser
+ ".J'|| substr(t.OWNER||'_'||t.TABLE_NAME,0,29)||' as select * from '||t.OWNER||'.'||t.TABLE_NAME||"

@ -80,7 +80,7 @@ public class OracleExtractServiceImpl implements IOracleExtractService {
oracleExtract.createDBLink(conn, collectOracle); //创建dblink
oracleExtract.createTableSpace(conn, collectOracle, oracleModel); //创建表空间
oracleExtract.createUser(conn, collectOracle, oracleModel);//创建用户并授权
oracleExtract.extractColleDB(conn, collectOracle);//执行抽取
oracleExtract.extractColleDB(conn, collectOracle, oracleModel);//执行抽取
// client.updateOrAddReplicasLabelById(collectOracle.getName(), "isExtract", "2"); //更新oracle汇总状态0标示为未汇总1标示汇总中2标示汇总完成
cmd = "kubectl label --overwrite rc "
+ replicasName + " isExtract=2";

@ -121,14 +121,14 @@ public class ThreadMoveData{
realRate = (dstSize*100 / srcSize );
dataMove.setLastTime(DateForm.date2StringBysecond(new Date()));
}
if (srcSize == dstSize) {
if (srcSize == dstSize || realRate > 100) {
realRate = 100;
}
dataMove.setRate((int) realRate);
}
if("1".equals(dataMove.getCompleteStatus()) && dataMove.getRate() > 0){
//传输完毕:进行校验
if (realRate == 100) {
if (realRate >= 100) {
int difSize = (int) (srcSizeTemp-dstSize);
Thread.sleep(10*difSize);
//TODO 查看当前拷贝目录进程是否结束?

Loading…
Cancel
Save