parent
9379020534
commit
582f55a619
File diff suppressed because it is too large
Load Diff
@ -1,130 +1,130 @@
|
||||
package com.platform.utils;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/** 配置启动 变量
|
||||
* @author chen
|
||||
*
|
||||
*/
|
||||
public class Configs {
|
||||
|
||||
/** 全局自定义异常--编码 */
|
||||
public static final String GLOBAL_EXP_CUSTOM = "3001001001";
|
||||
|
||||
/** 全局非自定义异常--编码 */
|
||||
public static final String GLOBAL_EXP_NOT_CUSTOM = "3001001002";
|
||||
|
||||
public static final String CONFIG_LOCALTION = "WebContent/WEB-INF/config/config.properties";
|
||||
|
||||
public static final Logger CONSOLE_LOGGER = Logger.getLogger("console");
|
||||
|
||||
public static final Logger DAILY_ROLLING_LOGGER = Logger
|
||||
.getLogger("dailyRollingFile");
|
||||
|
||||
public static final Logger DAILY_LOGGER = Logger.getLogger("railyFile");
|
||||
|
||||
public static final Logger LOGGER = Logger.getLogger(Configs.class);
|
||||
|
||||
public static String KUBE_MASTER_URL = "http://192.168.0.110:8080/"; // kubernetes集群的maser
|
||||
// URl
|
||||
|
||||
public static String KUBE_MASTER_ADDRESS="127.0.0.1:8080";
|
||||
|
||||
|
||||
public static int ORACLE_DEFAULT_PORT = 1521; // oracle的默认端口号
|
||||
|
||||
public static String COLLECT_USER_NAME = "system"; //采集统一的登入用户名
|
||||
|
||||
public static String COLLECT_PASSWORD = "oracle"; //采集统一的登入密码
|
||||
|
||||
public static String COLLECT_SERVICE_NAME = "orcl"; //采集库统一的服务名
|
||||
|
||||
public static String GATHER_PORT ="1521"; //汇总库的端口号
|
||||
|
||||
public static String GATHER_USER_NAME = "system"; //汇总库的登入用户名
|
||||
|
||||
public static String GATHER_USER_PASSWORD = "1"; //汇总库的登入密码
|
||||
|
||||
/** 抽取标准表 的 标准表所在 用户 */
|
||||
public static String GATHER_STANDARD_USER_NAME = "u_bzbjy";
|
||||
|
||||
/** 可执行表名 */
|
||||
public static String GATHER_STANDARD_EXEC_TABLE_NAME = "kzxzb";
|
||||
|
||||
/** 可支付表名 */
|
||||
public static String GATHER_STANDARD_PAY_TABLE_NAME = "zfxxb";
|
||||
|
||||
public static String GATHER_SERVICE_NAME = "orcl"; //汇总库的服务名
|
||||
|
||||
public static String TABLE_SUFFIX = "_20152016"; //汇总库汇总表的后缀名
|
||||
|
||||
public static String EXTRACT_LOG_LOCALTION = "D:\\log"; //数据汇总日志保存位置
|
||||
|
||||
public static String EXTRACT_STANDARD_LOG_LOCALTION = "D:\\log2"; //数据抽取日志保存位置
|
||||
|
||||
public static String GATHER_TABLESPACE_NAME=""; //表空间名
|
||||
|
||||
public static String GATHER_TABLESPACE_PATH=""; //表空间路径
|
||||
|
||||
public static String GATHER_TABLE_PASSWORD="1"; //登入密码
|
||||
|
||||
/** excel上传路径 */
|
||||
public static String FILE_UPLOAD_PATH="";
|
||||
|
||||
/** excel下载路经 */
|
||||
public static String FILE_DOWNLOAD_PATH="";
|
||||
|
||||
/** 包下载路径 */
|
||||
public static String PACKAGE_DOWNLOAD_PATH="";
|
||||
|
||||
/** 下载包名 */
|
||||
public static String PACKAGE_NAME="";
|
||||
|
||||
/**
|
||||
* 最新脚本的位置
|
||||
*/
|
||||
public static String SQL_SCRIPT_PATH_LAST="D:\\test\\sql_script_last\\";
|
||||
/** 归档脚本的位置 */
|
||||
public static String SQL_SCRIPT_PATH_STANDARD="D:\\test\\sql_script_standard\\";
|
||||
|
||||
/**
|
||||
* 多少 个月前的数据
|
||||
*/
|
||||
public static int dataBefore = 6;
|
||||
|
||||
/**
|
||||
* excel导入一次批量导入5个
|
||||
*/
|
||||
public static int NUM_ONE_IMPORT_EXCEL = 5;
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例名称
|
||||
*/
|
||||
public static String ORACLE_ORCL = "orcl";
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例登陆用户名
|
||||
*/
|
||||
public static String ORACLE_USER = "system";
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例登陆密码
|
||||
*/
|
||||
public static String ORACLE_PSW = "oracle";
|
||||
|
||||
/**
|
||||
* 采集库中的 标准表所在 的 用户
|
||||
*/
|
||||
public static String COLLECT_STANDARD_TABLE_USER = "u_bzbjy";
|
||||
|
||||
/**
|
||||
* 可执行的 标准表的 名
|
||||
*/
|
||||
public static String COLLECT_EXEC_TABLE = "kzxzb";
|
||||
|
||||
/**
|
||||
* 支付的 标准表的 名
|
||||
*/
|
||||
public static String COLLECT_PAY_TABLE = "zfxxb";
|
||||
|
||||
}
|
||||
package com.platform.utils;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/** 配置启动 变量
|
||||
* @author chen
|
||||
*
|
||||
*/
|
||||
public class Configs {
|
||||
|
||||
/** 全局自定义异常--编码 */
|
||||
public static final String GLOBAL_EXP_CUSTOM = "3001001001";
|
||||
|
||||
/** 全局非自定义异常--编码 */
|
||||
public static final String GLOBAL_EXP_NOT_CUSTOM = "3001001002";
|
||||
|
||||
public static final String CONFIG_LOCALTION = "WebContent/WEB-INF/config/config.properties";
|
||||
|
||||
public static final Logger CONSOLE_LOGGER = Logger.getLogger("console");
|
||||
|
||||
public static final Logger DAILY_ROLLING_LOGGER = Logger
|
||||
.getLogger("dailyRollingFile");
|
||||
|
||||
public static final Logger DAILY_LOGGER = Logger.getLogger("railyFile");
|
||||
|
||||
public static final Logger LOGGER = Logger.getLogger(Configs.class);
|
||||
|
||||
public static String KUBE_MASTER_URL = "http://192.168.0.110:8080/"; // kubernetes集群的maser
|
||||
// URl
|
||||
|
||||
public static String KUBE_MASTER_ADDRESS="127.0.0.1:8080";
|
||||
|
||||
|
||||
public static int ORACLE_DEFAULT_PORT = 1521; // oracle的默认端口号
|
||||
|
||||
public static String COLLECT_USER_NAME = "system"; //采集统一的登入用户名
|
||||
|
||||
public static String COLLECT_PASSWORD = "oracle"; //采集统一的登入密码
|
||||
|
||||
public static String COLLECT_SERVICE_NAME = "orcl"; //采集库统一的服务名
|
||||
|
||||
public static String GATHER_PORT ="1521"; //汇总库的端口号
|
||||
|
||||
public static String GATHER_USER_NAME = "system"; //汇总库的登入用户名
|
||||
|
||||
public static String GATHER_USER_PASSWORD = "1"; //汇总库的登入密码
|
||||
|
||||
/** 抽取标准表 的 标准表所在 用户 */
|
||||
public static String GATHER_STANDARD_USER_NAME = "u_bzbjy";
|
||||
|
||||
/** 可执行表名 */
|
||||
public static String GATHER_STANDARD_EXEC_TABLE_NAME = "kzxzb";
|
||||
|
||||
/** 可支付表名 */
|
||||
public static String GATHER_STANDARD_PAY_TABLE_NAME = "zfxxb";
|
||||
|
||||
public static String GATHER_SERVICE_NAME = "orcl"; //汇总库的服务名
|
||||
|
||||
public static String TABLE_SUFFIX = "_20152016"; //汇总库汇总表的后缀名
|
||||
|
||||
public static String EXTRACT_LOG_LOCALTION = "D:\\log"; //数据汇总日志保存位置
|
||||
|
||||
public static String EXTRACT_STANDARD_LOG_LOCALTION = "D:\\log2"; //数据抽取日志保存位置
|
||||
|
||||
public static String GATHER_TABLESPACE_NAME=""; //表空间名
|
||||
|
||||
public static String GATHER_TABLESPACE_PATH=""; //表空间路径
|
||||
|
||||
public static String GATHER_TABLE_PASSWORD="1"; //登入密码
|
||||
|
||||
/** excel上传路径 */
|
||||
public static String FILE_UPLOAD_PATH="";
|
||||
|
||||
/** excel下载路经 */
|
||||
public static String FILE_DOWNLOAD_PATH="";
|
||||
|
||||
/** 包下载路径 */
|
||||
public static String PACKAGE_DOWNLOAD_PATH="";
|
||||
|
||||
/** 下载包名 */
|
||||
public static String PACKAGE_NAME="";
|
||||
|
||||
/**
|
||||
* 最新脚本的位置
|
||||
*/
|
||||
public static String SQL_SCRIPT_PATH_LAST="D:\\test\\sql_script_last\\";
|
||||
/** 归档脚本的位置 */
|
||||
public static String SQL_SCRIPT_PATH_STANDARD="D:\\test\\sql_script_standard\\";
|
||||
|
||||
/**
|
||||
* 多少 个月前的数据
|
||||
*/
|
||||
public static int dataBefore = 6;
|
||||
|
||||
/**
|
||||
* excel导入一次批量导入5个
|
||||
*/
|
||||
public static int NUM_ONE_IMPORT_EXCEL = 5;
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例名称
|
||||
*/
|
||||
public static String ORACLE_ORCL = "orcl";
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例登陆用户名
|
||||
*/
|
||||
public static String ORACLE_USER = "system";
|
||||
|
||||
/**
|
||||
* docker启动的 oracle服务 的 实例登陆密码
|
||||
*/
|
||||
public static String ORACLE_PSW = "oracle";
|
||||
|
||||
/**
|
||||
* 采集库中的 标准表所在 的 用户
|
||||
*/
|
||||
public static String COLLECT_STANDARD_TABLE_USER = "u_bzbjy";
|
||||
|
||||
/**
|
||||
* 可执行的 标准表的 名
|
||||
*/
|
||||
public static String COLLECT_EXEC_TABLE = "kzxzb";
|
||||
|
||||
/**
|
||||
* 支付的 标准表的 名
|
||||
*/
|
||||
public static String COLLECT_PAY_TABLE = "zfxxb";
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.platform.test;
|
||||
|
||||
public class testStateThread {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
for (int i = 0; i < 100; i++) {
|
||||
Thread t1 = new Thread(new testStatement(), "线程-"+i);
|
||||
t1.setDaemon(true);
|
||||
t1.start();
|
||||
}
|
||||
try {
|
||||
Thread.sleep(50000);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.platform.test;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
public class testStatement implements Runnable{
|
||||
|
||||
private static Connection createConnect() {
|
||||
|
||||
Connection conn = null;
|
||||
try {
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
conn = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.110:1590:ORCL", "system", "oracle");
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ClassNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
return conn;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Connection conn = createConnect();
|
||||
|
||||
for(int i=0;i<1000;i++)
|
||||
{
|
||||
Statement prepstmt = null;
|
||||
try {
|
||||
// PreparedStatement prepstmt = conn.prepareStatement("select TABLESPACE_NAME from dba_tablespaces where TABLESPACE_NAME = 'ORCL'");
|
||||
// int numi = prepstmt.executeUpdate();
|
||||
prepstmt = conn.createStatement();
|
||||
int numi = prepstmt.executeUpdate("select TABLESPACE_NAME from dba_tablespaces where TABLESPACE_NAME = 'ORCL'");
|
||||
|
||||
|
||||
System.out.println(Thread.currentThread().getName()+" "+i +" : "+ numi);
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
if (prepstmt != null) {
|
||||
try {
|
||||
prepstmt.close();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue