web_backend_develope
wu ming 9 years ago
commit 7bcc95e0d4

@ -1,119 +1,120 @@
#=============================================================================================================
# MySQL
#=============================================================================================================
# 驱动程序
jdbc.mysql.driver=com.mysql.jdbc.Driver
# 连接url
jdbc.mysql.url=jdbc:mysql://192.168.0.110:3306/ftpdata?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false
# 用户名
jdbc.mysql.username=root
# 密码
jdbc.mysql.password=root
#=============================================================================================================
# Oracle 连接配置
#=============================================================================================================
# hui用户名
gather-user-name=system
gather-standard-user-name=u_bzbjy
gather-standard-exec-table-name=kzxzb
gather-standard-pay-table-name=zfxxb
# 密码
gather-user-password=oracle
#
gather-port=1521
#
gather-service-name=orcl
#=============================================================================================================
# 数据库公共配置
#=============================================================================================================
jdbc.initialSize=5
jdbc.minIdle=5
jdbc.maxIdle=20
jdbc.maxActive=100
jdbc.maxWait=100000
jdbc.defaultAutoCommit=false
jdbc.removeAbandoned=true
jdbc.removeAbandonedTimeout=600
jdbc.testWhileIdle=true
jdbc.timeBetweenEvictionRunsMillis=60000
jdbc.numTestsPerEvictionRun=20
jdbc.minEvictableIdleTimeMillis=300000
#==============================================================================================================
#
#==============================================================================================================
table-suffix=_20152016
gather-tablespace-name=TS_TTSSS
#dbf file's path must exist
gather-tablespace-path=/opt/oracle/app/oradata/orcl/
# user's password must exist
gather-table-user-password=user
#kuber's url must exist
kubeMasterUrl=http://192.168.0.110:8080/
kubeMasterAddress=192.168.0.110:8080
collect-user-name=system
collect-password=oracle
collect-service-name=orcl
# standard table :
# eg:sql -> select count(*) from u_bzbjy.kzxzb; select count(*) from u_bzbjy.zfxxb;
collect-user-table=U_BZBJY
collect-exec-table=KZXZB
collect-pay-table=ZFXXB
#gfs web's IP
gfs_control_ip=192.168.0.110
#gfs web password of root
gfs_control_rootPassWd=root
#url of gfs web
HttpClientConstant_URL_IP_PORT=http://192.168.0.110:9001/
#data between 6 month ago and now
dataBefore=6
#move a data once
moveFileMaxNum=1
#import 5 rows of Excel once
numOneImportExcel=5
oracle-orcl=orcl
oracle-user=system
oracle-psw=oracle
#=============================================================================================================
# windows path
#=============================================================================================================
extract-log-localtion=D:\\test\\log\\
extract-standard-log-localtion=D:\\test\\log2\\
file_upload_path=D:\\test\\
file_download_path=D:\\test\\export.xlsx
package_download_path=D:\\test\\
package_name=sql_script_standard
sql_script_path_last=D:\\test\\sql_script_last\\
sql_script_path_standard=D:\\test\\sql_script_standard\\
#=============================================================================================================
# linux path
#=============================================================================================================
## extract's log file location
#extract-log-localtion=/home/web_manage/log/
## standard extract's log file location
#extract-standard-log-localtion=/home/web_manage/log2/
##import excel file's location
#file_upload_path=/excel_import_dir/
##export excel file's location
#file_download_path=/excel_export_dir/export.xlsx
##file package download's location
#package_download_path=/
##file package's name
#package_name=DefaultDescription
##location of sql script lastest
#sql_script_path_last=/DefaultDescription_last/
##location of sql script standard
#sql_script_path_standard=/DefaultDescription/
#=============================================================================================================
# MySQL
#=============================================================================================================
# 驱动程序
jdbc.mysql.driver=com.mysql.jdbc.Driver
# 连接url
jdbc.mysql.url=jdbc:mysql://192.168.0.110:3306/ftpdata?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false
# 用户名
jdbc.mysql.username=root
# 密码
jdbc.mysql.password=root
#=============================================================================================================
# Oracle 连接配置
#=============================================================================================================
# hui用户名
gather-user-name=system
gather-standard-user-name=u_bzbjy
gather-standard-exec-table-name=kzxzb
gather-standard-pay-table-name=zfxxb
# 密码
gather-user-password=oracle
#
gather-port=1521
#
gather-service-name=orcl
#=============================================================================================================
# 数据库公共配置
#=============================================================================================================
jdbc.initialSize=5
jdbc.minIdle=5
jdbc.maxIdle=20
jdbc.maxActive=100
jdbc.maxWait=100000
jdbc.defaultAutoCommit=false
jdbc.removeAbandoned=true
jdbc.removeAbandonedTimeout=600
jdbc.testWhileIdle=true
jdbc.timeBetweenEvictionRunsMillis=60000
jdbc.numTestsPerEvictionRun=20
jdbc.minEvictableIdleTimeMillis=300000
#==============================================================================================================
#
#==============================================================================================================
table-suffix=_20152016
gather-tablespace-name=TS_TTSSS
#dbf file's path must exist
gather-tablespace-path=/opt/oracle/app/oradata/orcl/
# user's password must exist
gather-table-user-password=user
#kuber's url must exist
kubeMasterUrl=http://192.168.0.110:8080/
kubeMasterAddress=192.168.0.110:8080
collect-user-name=system
collect-password=oracle
collect-service-name=orcl
# standard table :
# eg:sql -> select count(*) from u_bzbjy.kzxzb; select count(*) from u_bzbjy.zfxxb;
collect-user-table=U_BZBJY
collect-exec-table=KZXZB
collect-pay-table=ZFXXB
#gfs web's IP
gfs_control_ip=192.168.0.110
#gfs web password of root
gfs_control_rootPassWd=root
#url of gfs web
HttpClientConstant_URL_IP_PORT=http://192.168.0.110:9001/
#data between 6 month ago and now
dataBefore=6
#move a data once
moveFileMaxNum=1
#import 5 rows of Excel once
numOneImportExcel=5
oracle-orcl=orcl
oracle-user=system
oracle-psw=oracle
#=============================================================================================================
# windows path
#=============================================================================================================
extract-log-localtion=D:\\test\\log\\
extract-standard-log-localtion=D:\\test\\log2\\
file_upload_path=D:\\test\\
file_download_path=D:\\test\\export.xlsx
package_download_path=D:\\test\\
package_name=sql_script_standard
sql_script_path_last=D:\\test\\sql_script_last\\
sql_script_path_standard=D:\\test\\sql_script_standard\\
#=============================================================================================================
# linux path
#=============================================================================================================
## extract's log file location
#extract-log-localtion=/home/web_manage/log/
## standard extract's log file location
#extract-standard-log-localtion=/home/web_manage/log2/
##import excel file's location
#file_upload_path=/excel_import_dir/
##export excel file's location
#file_download_path=/excel_export_dir/export.xlsx
##file package download's location
#package_download_path=/
##file package's name
#package_name=DefaultDescription
##location of sql script lastest
#sql_script_path_last=/DefaultDescription_last/
##location of sql script standard
#sql_script_path_standard=/DefaultDescription/

@ -58,7 +58,7 @@ public class CheckoutController extends BaseController {
}
/**
* ----
* ----
* @return
* @throws Exception
*/
@ -95,7 +95,7 @@ public class CheckoutController extends BaseController {
}
/**
* ----
* ----
* @return
* @throws Exception
*/
@ -116,7 +116,7 @@ public class CheckoutController extends BaseController {
}
/**
* ---- ->
* ----( )
* @return
* @throws Exception
*/

File diff suppressed because it is too large Load Diff

@ -39,13 +39,13 @@ public class PagerOptions extends Page{
private Integer offset; // 查询偏移量起始id
private String keyQuery;
//模糊查询字段
private List<String> array;
private String keyQuery;//模糊查询字段
private String volumeType;
//冷热区字段
private String mark;
private List<String> array;//模糊查询字段数组
private String volumeType;//冷热区字段
private String mark;//冷热区字段
public String getDataType() {
return dataType;

@ -5,10 +5,20 @@ import java.util.Properties;
import com.platform.entities.SqlFileInfoEntity;
/**
* @author chen
*
*/
public class ScriptForm {
/**
*
*/
private String content;
/**
*
*/
private SqlFileInfoEntity item;
/**

@ -29,9 +29,9 @@ public class VolumeForm {
/** 挂载点 */
private String path;
/** * exist正常返回状态Started,Stopped,Created */
private boolean status;
/** * exist正常返回状态Started,Stopped,Created */
private String type;
/** volume树形目录 */

@ -5,16 +5,25 @@ import java.util.List;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.FolderNode;
/**--volume
/**--
* @author chen
*
*/
public class volumeMoveForm {
/**
* volume
*/
private String name;
/**
*
*/
private FolderNode selectNode;
/**
*
*/
private List<DataInfoEntity> selectItems;
/**

@ -32,6 +32,12 @@ public interface IMoveDataService {
*/
public int delete(DataInfoEntityMoveTmp dataMove) throws Exception;
/**
* @return
* @throws Exception
*/
public int delete(String... ids) throws Exception;
/** --
* @param data
* @return

File diff suppressed because it is too large Load Diff

@ -76,9 +76,9 @@ public class CheckoutServiceImpl implements ICheckoutService {
List<CheckoutEntity> checks = new ArrayList<CheckoutEntity>();
List<PreDataInfo> result = preDataInfoDao.findAllCollect();
DataInfoEntity data = new DataInfoEntity();
Calendar c2 = Calendar.getInstance();
Calendar c2 = Calendar.getInstance();
// 时间设置为 半年前的时间
c2.set(Calendar.MONTH, getMonBeforeHalfYear(c2.get(Calendar.MONTH)));
this.getMonBeforeHalfYear(c2);
String time = DateForm.date2StringByDay(c2.getTime());
data.setCollectingTime(time);
// data.setCollectingTime(collectingTime);
@ -124,7 +124,7 @@ public class CheckoutServiceImpl implements ICheckoutService {
CheckoutEntity cksql = new CheckoutEntity();
Calendar c2 = Calendar.getInstance();
// 时间设置为 半年前的时间
c2.set(Calendar.MONTH, getMonBeforeHalfYear(c2.get(Calendar.MONTH)));
this.getMonBeforeHalfYear(c2);
String time = DateForm.date2StringByDay(c2.getTime());
cksql.setCollectingTime(time);
cksql.setCityName(city);
@ -451,12 +451,9 @@ public class CheckoutServiceImpl implements ICheckoutService {
* @param num
* @return
*/
private int getMonBeforeHalfYear(int num){
num -= Configs.dataBefore;
if (num <= 0) {
num = num + 12;
}
return num;
private int getMonBeforeHalfYear(Calendar c2){
c2.set(Calendar.DAY_OF_YEAR, c2.get(Calendar.DAY_OF_YEAR) -(Configs.dataBefore*30));
return 1;
}
private String isY(String str1, String str2) {

@ -210,11 +210,14 @@ public class MoveDataServiceImpl implements IMoveDataService {
}
}
int result = 0;
//迁移失败
if ("3".equals(dataMove.getCompleteStatus())) {
removeservice.deleteFolder(dataMove.getDstPath());
int code = removeservice.deleteFolder(dataMove.getDstPath());
if (code == -100) {
return result;
}
}
int result = 0;
//是正则迁移时:
if ("1".equals(dataMove.getCompleteStatus())) {
if(1 != removeservice.abortcopyFolder(dataMove.getDataPath(), makeDstPath(dataMove.getDstPath()))){
@ -263,4 +266,42 @@ public class MoveDataServiceImpl implements IMoveDataService {
}
return dstPath;
}
@Override
public int delete(String... ids) throws Exception {
List<DataInfoEntityMoveTmp> list = dataInfoMoveTmpDao.findAll();
List<DataInfoEntityMoveTmp> dellist = new ArrayList<DataInfoEntityMoveTmp>();
if (null != list) {
for (DataInfoEntityMoveTmp dataInfoEntityMoveTmp : list) {
for (String id : ids) {
if (Integer.valueOf(id) == dataInfoEntityMoveTmp.getId()) {
dellist.add(dataInfoEntityMoveTmp);
}
}
}
}
int result = 0;
for (DataInfoEntityMoveTmp dataMove : dellist) {
//迁移失败
if ("3".equals(dataMove.getCompleteStatus())) {
int code = removeservice.deleteFolder(dataMove.getDstPath());
if (code == -100) {
continue;
}
}
//是正则迁移时:
if ("1".equals(dataMove.getCompleteStatus())) {
if(1 != removeservice.abortcopyFolder(dataMove.getDataPath(), makeDstPath(dataMove.getDstPath()))){
try{
removeservice.deleteFolder(dataMove.getDstPath());
}catch(Exception e){
log.error(e);
}
}
}
result = dataInfoMoveTmpDao.remove(dataMove.getId());
}
return result;
}
}

File diff suppressed because it is too large Load Diff

@ -8,6 +8,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
@ -154,10 +155,11 @@ public class ThreadExtractStandardSqlServer extends Thread{
// TODO Auto-generated catch block
e.printStackTrace();
}
Connection conn = null;
try {
File execSql = new File(execFilePath);
Connection conn = OracleConnector.connectionBuilder("jdbc:oracle:thin:@" + oracleConnect.getIp() + ":" + oracleConnect.getPort() + ":"
conn = OracleConnector.connectionBuilder("jdbc:oracle:thin:@" + oracleConnect.getIp() + ":" + oracleConnect.getPort() + ":"
+ oracleConnect.getDatabaseName(), oracleConnect.getUser(), oracleConnect.getPassword(), null);
File execSql = new File(execFilePath);
// 创建表空间 创建 抽取标准表的 用户并授权
oracleExtract.createTableSpace(conn, collectOracle , oracleConnect); //
oracleExtract.createOnlyUser(conn, collectOracle, oracleConnect);//
@ -199,8 +201,17 @@ public class ThreadExtractStandardSqlServer extends Thread{
// TODO Auto-generated catch block
e.printStackTrace();
}
finally{
try {
conn.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
//删除保存过的id
CacheSetCantDelete.removeStandardId(String.valueOf(element.getDataId()));
// sql日志记录时间

File diff suppressed because it is too large Load Diff

@ -114,6 +114,9 @@ public class GanymedSSH {
Session sess = null;
try {
// conn = getOpenedConnection(host, username, password, port);
if (null != conn) {
// conn=getOpenedConnection(Configs., username, password, port)
}
sess = conn.openSession();
// 执锟斤拷cmd
sess.execCommand(cmd);

Loading…
Cancel
Save