|
@@ -287,7 +287,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "container not initialized");
|
|
throw new MyException("ZillionAgent: " + "container not initialized");
|
|
}
|
|
}
|
|
|
|
|
|
- KerberosUtil.reloginFromKeytab(container.DatabaseImpl);
|
|
|
|
|
|
+ KerberosUtil.reloginFromKeytab(container.DatabaseImpl, false, true);
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
result.put("Result", "failure");
|
|
result.put("Result", "failure");
|
|
@@ -500,7 +500,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String method_name = Thread.currentThread().getStackTrace()[1].getMethodName();
|
|
String method_name = Thread.currentThread().getStackTrace()[1].getMethodName();
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + schema.table_name;
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + schema.table_name;
|
|
String lock_type_meta = "w";
|
|
String lock_type_meta = "w";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(container.ZK, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(container.ZK, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -535,7 +535,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(container.ZK, node_path_meta);
|
|
ZKLockRW.Finish(container.ZK, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -576,7 +576,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String method_name = Thread.currentThread().getStackTrace()[1].getMethodName();
|
|
String method_name = Thread.currentThread().getStackTrace()[1].getMethodName();
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_splitlocks + "/" + schema.table_name;
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_splitlocks + "/" + schema.table_name;
|
|
String lock_type_meta = "w";
|
|
String lock_type_meta = "w";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(container.ZK, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(container.ZK, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -653,7 +653,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(container.ZK, node_path_meta);
|
|
ZKLockRW.Finish(container.ZK, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -895,14 +895,14 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw e;
|
|
throw e;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- // 清理OrderBy
|
|
|
|
|
|
+ // 锟斤拷锟斤拷OrderBy
|
|
if (queryJSON.containsKey("OrderBy")) {
|
|
if (queryJSON.containsKey("OrderBy")) {
|
|
JSONArray OrderBy = (JSONArray) queryJSON.get("OrderBy");
|
|
JSONArray OrderBy = (JSONArray) queryJSON.get("OrderBy");
|
|
if (OrderBy == null || OrderBy.size() == 0) {
|
|
if (OrderBy == null || OrderBy.size() == 0) {
|
|
queryJSON.remove("OrderBy");
|
|
queryJSON.remove("OrderBy");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 在指定查询结果集合中二次查询
|
|
|
|
|
|
+ // ��ָ����ѯ��������ж��β�ѯ
|
|
if ((QueryType.equals("select") || QueryType.equals("combine_select")) && queryJSON.containsKey("QueryTarget")) {
|
|
if ((QueryType.equals("select") || QueryType.equals("combine_select")) && queryJSON.containsKey("QueryTarget")) {
|
|
JSONObject QueryTarget = (JSONObject) queryJSON.get("QueryTarget");
|
|
JSONObject QueryTarget = (JSONObject) queryJSON.get("QueryTarget");
|
|
JSONObject QueryResultInner = this.Query(QueryTarget);
|
|
JSONObject QueryResultInner = this.Query(QueryTarget);
|
|
@@ -1016,7 +1016,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
use = schema.useTable(this.container.ZK, this.full_name);
|
|
use = schema.useTable(this.container.ZK, this.full_name);
|
|
}
|
|
}
|
|
if (use) {
|
|
if (use) {
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
schema.usingAdd();
|
|
schema.usingAdd();
|
|
try {
|
|
try {
|
|
JSONArray content = new JSONArray();
|
|
JSONArray content = new JSONArray();
|
|
@@ -1342,7 +1342,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
return result;
|
|
return result;
|
|
} else {
|
|
} else {
|
|
throw new MyException("ZillionAgent: " + namespace + " " + tableName + " useTable fail");
|
|
throw new MyException("ZillionAgent: " + namespace + " " + tableName + " useTable fail");
|
|
@@ -1374,7 +1374,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
ZKWrapper zookeeper = this.container.ZK;
|
|
ZKWrapper zookeeper = this.container.ZK;
|
|
String parent_path_ns = ZillionConstant.zk_root + ZillionConstant._nslock;
|
|
String parent_path_ns = ZillionConstant.zk_root + ZillionConstant._nslock;
|
|
String lock_type_ns = "w";
|
|
String lock_type_ns = "w";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_me = ZKLockRW.Create(zookeeper, parent_path_ns, lock_type_ns, this.full_name);
|
|
String node_path_me = ZKLockRW.Create(zookeeper, parent_path_ns, lock_type_ns, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " WaitFor " + node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " WaitFor " + node_path_me);
|
|
@@ -1407,7 +1407,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_me);
|
|
ZKLockRW.Finish(zookeeper, node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " finish " + node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " finish " + node_path_me);
|
|
}
|
|
}
|
|
@@ -1443,7 +1443,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
ZKWrapper zookeeper = this.container.ZK;
|
|
ZKWrapper zookeeper = this.container.ZK;
|
|
String parent_path_ns = ZillionConstant.zk_root + ZillionConstant._nslock;
|
|
String parent_path_ns = ZillionConstant.zk_root + ZillionConstant._nslock;
|
|
String lock_type_ns = "w";
|
|
String lock_type_ns = "w";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_me = ZKLockRW.Create(zookeeper, parent_path_ns, lock_type_ns, this.full_name);
|
|
String node_path_me = ZKLockRW.Create(zookeeper, parent_path_ns, lock_type_ns, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " WaitFor " + node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " WaitFor " + node_path_me);
|
|
@@ -1456,7 +1456,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String zkpath_namespace = ZillionConstant.zk_root + ZillionConstant._ns + "/" + namespace;
|
|
String zkpath_namespace = ZillionConstant.zk_root + ZillionConstant._ns + "/" + namespace;
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_metalock;
|
|
String parent_path_meta = zkpath_namespace + ZillionConstant.zk_metalock;
|
|
String lock_type_meta = "w";
|
|
String lock_type_meta = "w";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -1485,14 +1485,14 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_me);
|
|
ZKLockRW.Finish(zookeeper, node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " finish " + node_path_me);
|
|
LogUtil.info(" ********************************** " + method_name + " nslock:" + " finish " + node_path_me);
|
|
}
|
|
}
|
|
@@ -1534,7 +1534,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 检查
|
|
|
|
|
|
+ // ���
|
|
{
|
|
{
|
|
ZillionTableSchema schema = new ZillionTableSchema(namespace, tableName);
|
|
ZillionTableSchema schema = new ZillionTableSchema(namespace, tableName);
|
|
schema.JSON = content;
|
|
schema.JSON = content;
|
|
@@ -1567,7 +1567,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String lock_type_table = "c";
|
|
String lock_type_table = "c";
|
|
String check_type_table = "c";
|
|
String check_type_table = "c";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -1579,7 +1579,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -1593,7 +1593,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
String table_type;
|
|
String table_type;
|
|
if (!content.containsKey("table_type")) {
|
|
if (!content.containsKey("table_type")) {
|
|
table_type = "index_data";
|
|
table_type = "index_data";
|
|
@@ -1679,7 +1679,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -1688,7 +1688,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -1698,7 +1698,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -1830,7 +1830,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String lock_type_table = "e";
|
|
String lock_type_table = "e";
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
|
|
|
|
- // 无锁修改表结构
|
|
|
|
|
|
+ // �����ı�ṹ
|
|
if (this.container.without_lock) {
|
|
if (this.container.without_lock) {
|
|
this.DDL_AlterTable_inner(schema_exist, zookeeper, namespace, tableName, alter_type, alter_content);
|
|
this.DDL_AlterTable_inner(schema_exist, zookeeper, namespace, tableName, alter_type, alter_content);
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
@@ -1844,7 +1844,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -1856,7 +1856,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -1880,7 +1880,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -1890,7 +1890,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -1907,7 +1907,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String lock_type_table = "e";
|
|
String lock_type_table = "e";
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
Stat stat = new Stat();
|
|
Stat stat = new Stat();
|
|
byte[] data_bytes = zookeeper.getData(zkpath_namespace + ZillionConstant.zk_meta_data + "/" + tableName, false, stat);
|
|
byte[] data_bytes = zookeeper.getData(zkpath_namespace + ZillionConstant.zk_meta_data + "/" + tableName, false, stat);
|
|
JSONObject content = (JSONObject) FastJsonReaderUtil.Instance().parse(new String(data_bytes, "UTF-8"));
|
|
JSONObject content = (JSONObject) FastJsonReaderUtil.Instance().parse(new String(data_bytes, "UTF-8"));
|
|
@@ -1932,7 +1932,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
content.remove("compress");
|
|
content.remove("compress");
|
|
}
|
|
}
|
|
content.put("compress", compress);
|
|
content.put("compress", compress);
|
|
- // 处理
|
|
|
|
|
|
+ // 锟斤拷锟斤拷
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
String indexName = schema_index.index_name;
|
|
String indexName = schema_index.index_name;
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
@@ -1965,7 +1965,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
boolean resident_memory = (Boolean) alter_content.get("resident_memory");
|
|
boolean resident_memory = (Boolean) alter_content.get("resident_memory");
|
|
content.put("resident_memory", resident_memory);
|
|
content.put("resident_memory", resident_memory);
|
|
|
|
|
|
- // 处理
|
|
|
|
|
|
+ // 锟斤拷锟斤拷
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
String indexName = schema_index.index_name;
|
|
String indexName = schema_index.index_name;
|
|
String tableNameString = ZillionConstant.prefix_index + (tableName + "." + indexName);
|
|
String tableNameString = ZillionConstant.prefix_index + (tableName + "." + indexName);
|
|
@@ -2033,7 +2033,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
this.container.DatabaseImpl.meta_query_update_data(namespace, tableName, content);
|
|
this.container.DatabaseImpl.meta_query_update_data(namespace, tableName, content);
|
|
|
|
|
|
int repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
int repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
return repo_version_new;
|
|
return repo_version_new;
|
|
}
|
|
}
|
|
@@ -2058,7 +2058,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String lock_type_table = "d";
|
|
String lock_type_table = "d";
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -2070,7 +2070,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2084,7 +2084,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
for (ZillionTableIndex schema_index : schema_exist.Indexes) {
|
|
String indexName = schema_index.index_name;
|
|
String indexName = schema_index.index_name;
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
@@ -2184,7 +2184,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2193,7 +2193,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -2203,7 +2203,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -2254,7 +2254,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
if (schema_exist == null) {
|
|
if (schema_exist == null) {
|
|
throw new MyException("ZillionAgent: " + "schema not exist: " + namespace + " " + tableName);
|
|
throw new MyException("ZillionAgent: " + "schema not exist: " + namespace + " " + tableName);
|
|
}
|
|
}
|
|
- // 检查
|
|
|
|
|
|
+ // ���
|
|
for (int index_index = 0; index_index < index_schemaArray.size(); index_index++) {
|
|
for (int index_index = 0; index_index < index_schemaArray.size(); index_index++) {
|
|
JSONObject index_schema = (JSONObject) index_schemaArray.get(index_index);
|
|
JSONObject index_schema = (JSONObject) index_schemaArray.get(index_index);
|
|
String indexName = (String) index_schema.get("Name");
|
|
String indexName = (String) index_schema.get("Name");
|
|
@@ -2281,7 +2281,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String lock_type_table = "e";
|
|
String lock_type_table = "e";
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -2293,7 +2293,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2307,7 +2307,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
String table_type = schema_exist.table_type;
|
|
String table_type = schema_exist.table_type;
|
|
List<ZillionTableIndex> schema_indexList = new ArrayList<ZillionTableIndex>();
|
|
List<ZillionTableIndex> schema_indexList = new ArrayList<ZillionTableIndex>();
|
|
for (int index_index = 0; index_index < index_schemaArray.size(); index_index++) {
|
|
for (int index_index = 0; index_index < index_schemaArray.size(); index_index++) {
|
|
@@ -2346,7 +2346,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2355,7 +2355,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -2365,7 +2365,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -2408,7 +2408,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String parent_path_table = zkpath_namespace + ZillionConstant.zk_tablelocks + "/" + tableName;
|
|
String lock_type_table = "e";
|
|
String lock_type_table = "e";
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
- // 获取meta锁
|
|
|
|
|
|
+ // 锟斤拷取meta锟斤拷
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
String node_path_meta = ZKLockRW.Create(zookeeper, parent_path_meta, lock_type_meta, this.full_name);
|
|
try {
|
|
try {
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " WaitFor " + node_path_meta);
|
|
@@ -2420,7 +2420,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2434,7 +2434,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
for (int index_index = 0; index_index < indexNameArray.size(); index_index++) {
|
|
for (int index_index = 0; index_index < indexNameArray.size(); index_index++) {
|
|
String indexName = (String) indexNameArray.get(index_index);
|
|
String indexName = (String) indexNameArray.get(index_index);
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
if (schema_exist.table_type != null && (schema_exist.table_type.startsWith("split_"))) {
|
|
@@ -2464,7 +2464,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
|
|
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
repo_version_new = ZKRepositoryUtil.ResetRepoVersion(zookeeper, namespace, parent_path_table, lock_type_table);
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
LogUtil.info(" ********************************** " + method_name + " work success ");
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2473,7 +2473,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -2483,7 +2483,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放meta锁
|
|
|
|
|
|
+ // 锟酵凤拷meta锟斤拷
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
ZKLockRW.Finish(zookeeper, node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
LogUtil.info(" ********************************** " + method_name + " metalock:" + " finish " + node_path_meta);
|
|
}
|
|
}
|
|
@@ -2529,7 +2529,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2543,7 +2543,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
List<ZillionTableIndex> schema_indexList = new ArrayList<ZillionTableIndex>();
|
|
List<ZillionTableIndex> schema_indexList = new ArrayList<ZillionTableIndex>();
|
|
for (int index = 0; index < indexNameList.size(); index++) {
|
|
for (int index = 0; index < indexNameList.size(); index++) {
|
|
String indexName = indexNameList.get(index);
|
|
String indexName = indexNameList.get(index);
|
|
@@ -2557,7 +2557,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
schema_indexList.add(index_exist);
|
|
schema_indexList.add(index_exist);
|
|
}
|
|
}
|
|
ZillionHashUtil.AddOrRepairIndex(this.container, schema_exist, schema_indexList, false, thread_count, job);
|
|
ZillionHashUtil.AddOrRepairIndex(this.container, schema_exist, schema_indexList, false, thread_count, job);
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2566,7 +2566,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -2611,7 +2611,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2625,9 +2625,9 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
ZillionHashUtil.RefreshHash(this.container, schema_exist, thread_count, job);
|
|
ZillionHashUtil.RefreshHash(this.container, schema_exist, thread_count, job);
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2636,7 +2636,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|
|
@@ -2672,7 +2672,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
String check_type_table = "d";
|
|
String check_type_table = "d";
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
boolean success = ZKLockCEDU.PreCheck(zookeeper, parent_path_table, check_type_table);
|
|
if (success) {
|
|
if (success) {
|
|
- // 获取table锁
|
|
|
|
|
|
+ // 锟斤拷取table锟斤拷
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
String node_path_table = ZKLockCEDU.Create(zookeeper, parent_path_table, lock_type_table, this.full_name);
|
|
try {
|
|
try {
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
int sequence_id = Integer.parseInt(node_path_table.substring(parent_path_table.length() + 3));
|
|
@@ -2686,7 +2686,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
throw new MyException("ZillionAgent: " + "WaitFor fail " + node_path_table);
|
|
}
|
|
}
|
|
|
|
|
|
- // 处理开始
|
|
|
|
|
|
+ // 锟斤拷锟斤拷始
|
|
if (schema_exist.Indexes.size() > 0) {
|
|
if (schema_exist.Indexes.size() > 0) {
|
|
Stat stat = new Stat();
|
|
Stat stat = new Stat();
|
|
byte[] hash_table = this.container.ZK.getData(zkpath_namespace + ZillionConstant.zk_hash_exist + "/" + tableName, false,
|
|
byte[] hash_table = this.container.ZK.getData(zkpath_namespace + ZillionConstant.zk_hash_exist + "/" + tableName, false,
|
|
@@ -2721,7 +2721,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} else {
|
|
} else {
|
|
returnJSON.put("Result", "success");
|
|
returnJSON.put("Result", "success");
|
|
}
|
|
}
|
|
- // 处理结束
|
|
|
|
|
|
+ // �������
|
|
|
|
|
|
result = true;
|
|
result = true;
|
|
} else {
|
|
} else {
|
|
@@ -2730,7 +2730,7 @@ public class ZillionAgent implements IZillionAgent {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw e;
|
|
throw e;
|
|
} finally {
|
|
} finally {
|
|
- // 释放table锁
|
|
|
|
|
|
+ // 锟酵凤拷table锟斤拷
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
ZKLockCEDU.Finish(zookeeper, node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
LogUtil.info(" ********************************** " + method_name + " tablelock:" + " finish " + node_path_table);
|
|
}
|
|
}
|