test_class.declarator: metaStore
test_class.modifier: private static
test_class.original_string: private static EtcdMetaStore metaStore;
test_class.type: EtcdMetaStore
test_class.var_name: metaStore
test_class.declarator: client
test_class.modifier: private static
test_class.original_string: private static EtcdClient client;
test_class.type: EtcdClient
test_class.var_name: client
test_class.declarator: config
test_class.modifier: private static
test_class.original_string: private static JimConfig config;
test_class.type: JimConfig
test_class.var_name: config
test_class.file: jimsql/jim-sdk/jim-metadata/src/test/java/io/jimdb/meta/EtcdMetaStoreTest.java
test_class.identifier: EtcdMetaStoreTest
test_case.body: @Test
    public void testGetTables() throws Exception {
      int parallel = 16;
      CountDownLatch latch = new CountDownLatch(parallel);
      HashMap<Integer, List<TableInfo>> listHashMap = new HashMap();
  
      for (int i = 0; i < parallel; i++) {
        Thread t = new Thread(() -> {
          List<TableInfo> tableInfos = new ArrayList<>();
          CatalogInfo.Builder builder = CatalogInfo.newBuilder();
          int id = metaStore.allocMetaID();
          builder.setId(id)
                  .setName("test_" + id);
          metaStore.storeCatalog(null, builder.build());
  
          for (int j = 0; j < 5; j++) {
            TableInfo.Builder builder1 = TableInfo.newBuilder();
            int id1 = metaStore.allocMetaID();
            TableInfo tableInfo = builder1.setDbId(builder.getId())
                    .setId(id1)
                    .setName("test_table_" + id1).build();
            metaStore.storeTable(null, tableInfo);
            tableInfos.add(tableInfo);
          }
          listHashMap.put(id, tableInfos);
          latch.countDown();
        });
        t.start();
      }
  
      latch.await();
      List<CatalogInfo> catalogs = metaStore.getCatalogs();
      Assert.assertEquals(parallel, catalogs.size());
  
      catalogs.forEach(e -> {
        List<TableInfo> ts = listHashMap.get(e.getId());
        Collections.sort(ts, (c1, c2) -> {
          if (c1.getId() == c2.getId()) {
            return 0;
          }
          return c1.getId() > c2.getId() ? 1 : -1;
        });
        List<TableInfo> tables = metaStore.getTables(e.getId());
        for (int i = 0; i < tables.size(); i++) {
          int metaTableId = tables.get(i).getId();
          int currentId = ts.get(i).getId();
          String metaTableName = tables.get(i).getName();
          String currentName = ts.get(i).getName();
          Assert.assertEquals(currentId, metaTableId);
          Assert.assertEquals(currentName, metaTableName);
        }
      });
    }
test_case.class_method_signature: EtcdMetaStoreTest.testGetTables()
test_case.full_signature: @Test public void testGetTables()
test_case.identifier: testGetTables
test_case.invocations: newBuilder allocMetaID setName setId storeCatalog build newBuilder allocMetaID build setName setId setDbId getId storeTable add put countDown start await getCatalogs assertEquals size forEach get getId sort getId getId getId getId getTables getId size getId get getId get getName get getName get assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTables()
focal_class.declarator: SYSTEM_ROOT = "/sql"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SYSTEM_ROOT = "/sql";
focal_class.type: String
focal_class.var_name: SYSTEM_ROOT
focal_class.declarator: INIT_PATH = SYSTEM_ROOT + "/init"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String INIT_PATH = SYSTEM_ROOT + "/init";
focal_class.type: String
focal_class.var_name: INIT_PATH
focal_class.declarator: INIT_LOCK_PATH = SYSTEM_ROOT + "/lock"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String INIT_LOCK_PATH = SYSTEM_ROOT + "/lock";
focal_class.type: String
focal_class.var_name: INIT_LOCK_PATH
focal_class.declarator: SCHEMA_ROOT = SYSTEM_ROOT + "/schema"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SCHEMA_ROOT = SYSTEM_ROOT + "/schema";
focal_class.type: String
focal_class.var_name: SCHEMA_ROOT
focal_class.declarator: SCHEMA_ID_PATH = SCHEMA_ROOT + "/id"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SCHEMA_ID_PATH = SCHEMA_ROOT + "/id";
focal_class.type: String
focal_class.var_name: SCHEMA_ID_PATH
focal_class.declarator: SCHEMA_VERSION_PATH = SCHEMA_ROOT + "/version"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SCHEMA_VERSION_PATH = SCHEMA_ROOT + "/version";
focal_class.type: String
focal_class.var_name: SCHEMA_VERSION_PATH
focal_class.declarator: SQL_NODE_ROOT = SCHEMA_ROOT + "/sqlnodes"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SQL_NODE_ROOT = SCHEMA_ROOT + "/sqlnodes";
focal_class.type: String
focal_class.var_name: SQL_NODE_ROOT
focal_class.declarator: SQL_NODE_LIST = SQL_NODE_ROOT + "/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SQL_NODE_LIST = SQL_NODE_ROOT + "/";
focal_class.type: String
focal_class.var_name: SQL_NODE_LIST
focal_class.declarator: SQL_NODE_PATH = SQL_NODE_ROOT + "/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String SQL_NODE_PATH = SQL_NODE_ROOT + "/%s";
focal_class.type: String
focal_class.var_name: SQL_NODE_PATH
focal_class.declarator: DB_ROOT = SCHEMA_ROOT + "/catalogs"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String DB_ROOT = SCHEMA_ROOT + "/catalogs";
focal_class.type: String
focal_class.var_name: DB_ROOT
focal_class.declarator: DB_LIST = DB_ROOT + "/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String DB_LIST = DB_ROOT + "/";
focal_class.type: String
focal_class.var_name: DB_LIST
focal_class.declarator: DB_PATH = DB_ROOT + "/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String DB_PATH = DB_ROOT + "/%s";
focal_class.type: String
focal_class.var_name: DB_PATH
focal_class.declarator: TABLE_ROOT = DB_PATH + "/tables"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TABLE_ROOT = DB_PATH + "/tables";
focal_class.type: String
focal_class.var_name: TABLE_ROOT
focal_class.declarator: TABLE_LIST = TABLE_ROOT + "/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TABLE_LIST = TABLE_ROOT + "/";
focal_class.type: String
focal_class.var_name: TABLE_LIST
focal_class.declarator: TABLE_PATH = TABLE_ROOT + "/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TABLE_PATH = TABLE_ROOT + "/%s";
focal_class.type: String
focal_class.var_name: TABLE_PATH
focal_class.declarator: TABLE_AUTO_ID_PATH = TABLE_PATH + "/autoid"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TABLE_AUTO_ID_PATH = TABLE_PATH + "/autoid";
focal_class.type: String
focal_class.var_name: TABLE_AUTO_ID_PATH
focal_class.declarator: TASK_ROOT = SCHEMA_ROOT + "/tasks"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_ROOT = SCHEMA_ROOT + "/tasks";
focal_class.type: String
focal_class.var_name: TASK_ROOT
focal_class.declarator: TASK_LIST = TASK_ROOT + "/active/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_LIST = TASK_ROOT + "/active/";
focal_class.type: String
focal_class.var_name: TASK_LIST
focal_class.declarator: TASK_PATH = TASK_LIST + "%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PATH = TASK_LIST + "%s";
focal_class.type: String
focal_class.var_name: TASK_PATH
focal_class.declarator: TASK_ID_PATH = TASK_ROOT + "/id"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_ID_PATH = TASK_ROOT + "/id";
focal_class.type: String
focal_class.var_name: TASK_ID_PATH
focal_class.declarator: TASK_HISTORY_ROOT = TASK_ROOT + "/history"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_HISTORY_ROOT = TASK_ROOT + "/history";
focal_class.type: String
focal_class.var_name: TASK_HISTORY_ROOT
focal_class.declarator: TASK_HISTORY_LIST = TASK_HISTORY_ROOT + "/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_HISTORY_LIST = TASK_HISTORY_ROOT + "/";
focal_class.type: String
focal_class.var_name: TASK_HISTORY_LIST
focal_class.declarator: TASK_HISTORY_PATH = TASK_HISTORY_ROOT + "/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_HISTORY_PATH = TASK_HISTORY_ROOT + "/%s";
focal_class.type: String
focal_class.var_name: TASK_HISTORY_PATH
focal_class.declarator: TASK_INDEX_ROOT = TASK_ROOT + "/index/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_INDEX_ROOT = TASK_ROOT + "/index/";
focal_class.type: String
focal_class.var_name: TASK_INDEX_ROOT
focal_class.declarator: TASK_INDEX_PATH = TASK_INDEX_ROOT + "%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_INDEX_PATH = TASK_INDEX_ROOT + "%s";
focal_class.type: String
focal_class.var_name: TASK_INDEX_PATH
focal_class.declarator: TASK_INDEX_RANGE = TASK_INDEX_PATH + "/ranges/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_INDEX_RANGE = TASK_INDEX_PATH + "/ranges/%s";
focal_class.type: String
focal_class.var_name: TASK_INDEX_RANGE
focal_class.declarator: TASK_INDEX_RANGE_LIST = TASK_INDEX_PATH + "/ranges/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_INDEX_RANGE_LIST = TASK_INDEX_PATH + "/ranges/";
focal_class.type: String
focal_class.var_name: TASK_INDEX_RANGE_LIST
focal_class.declarator: TASK_INDEX_RANGE_LOCK = TASK_INDEX_PATH + "/locks/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_INDEX_RANGE_LOCK = TASK_INDEX_PATH + "/locks/%s";
focal_class.type: String
focal_class.var_name: TASK_INDEX_RANGE_LOCK
focal_class.declarator: TASK_GLOBAL_LOCK_PATH = TASK_ROOT + "/lock/global"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_GLOBAL_LOCK_PATH = TASK_ROOT + "/lock/global";
focal_class.type: String
focal_class.var_name: TASK_GLOBAL_LOCK_PATH
focal_class.declarator: TASK_TABLE_LOCK_PATH = TASK_ROOT + "/lock/table/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_TABLE_LOCK_PATH = TASK_ROOT + "/lock/table/%s";
focal_class.type: String
focal_class.var_name: TASK_TABLE_LOCK_PATH
focal_class.declarator: PRIVILEGE_ROOT = SYSTEM_ROOT + "/privilege"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String PRIVILEGE_ROOT = SYSTEM_ROOT + "/privilege";
focal_class.type: String
focal_class.var_name: PRIVILEGE_ROOT
focal_class.declarator: PRI_VERSION_PATH = PRIVILEGE_ROOT + "/version"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String PRI_VERSION_PATH = PRIVILEGE_ROOT + "/version";
focal_class.type: String
focal_class.var_name: PRI_VERSION_PATH
focal_class.declarator: TASK_PRI_ROOT = PRIVILEGE_ROOT + "/tasks"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_ROOT = PRIVILEGE_ROOT + "/tasks";
focal_class.type: String
focal_class.var_name: TASK_PRI_ROOT
focal_class.declarator: TASK_PRI_LIST = TASK_PRI_ROOT + "/active/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_LIST = TASK_PRI_ROOT + "/active/";
focal_class.type: String
focal_class.var_name: TASK_PRI_LIST
focal_class.declarator: TASK_PRI_PATH = TASK_PRI_LIST + "%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_PATH = TASK_PRI_LIST + "%s";
focal_class.type: String
focal_class.var_name: TASK_PRI_PATH
focal_class.declarator: TASK_PRI_ID_PATH = TASK_PRI_ROOT + "/id"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_ID_PATH = TASK_PRI_ROOT + "/id";
focal_class.type: String
focal_class.var_name: TASK_PRI_ID_PATH
focal_class.declarator: TASK_PRI_HISTORY_ROOT = TASK_PRI_ROOT + "/history"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_HISTORY_ROOT = TASK_PRI_ROOT + "/history";
focal_class.type: String
focal_class.var_name: TASK_PRI_HISTORY_ROOT
focal_class.declarator: TASK_PRI_HISTORY_LIST = TASK_PRI_HISTORY_ROOT + "/"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_HISTORY_LIST = TASK_PRI_HISTORY_ROOT + "/";
focal_class.type: String
focal_class.var_name: TASK_PRI_HISTORY_LIST
focal_class.declarator: TASK_PRI_HISTORY_PATH = TASK_PRI_HISTORY_ROOT + "/%s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_HISTORY_PATH = TASK_PRI_HISTORY_ROOT + "/%s";
focal_class.type: String
focal_class.var_name: TASK_PRI_HISTORY_PATH
focal_class.declarator: TASK_PRI_LOCK_PATH = TASK_PRI_ROOT + "/lock/global"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String TASK_PRI_LOCK_PATH = TASK_PRI_ROOT + "/lock/global";
focal_class.type: String
focal_class.var_name: TASK_PRI_LOCK_PATH
focal_class.declarator: serverID
focal_class.modifier: protected
focal_class.original_string: protected String serverID;
focal_class.type: String
focal_class.var_name: serverID
focal_class.declarator: etcdClient
focal_class.modifier: protected
focal_class.original_string: protected EtcdClient etcdClient;
focal_class.type: EtcdClient
focal_class.var_name: etcdClient
focal_class.file: jimsql/jim-sdk/jim-metadata/src/main/java/io/jimdb/meta/EtcdMetaStore.java
focal_class.identifier: EtcdMetaStore
focal_class.interfaces: implements MetaStore
focal_class.class_method_signature: EtcdMetaStore.init(JimConfig c)
focal_class.full_signature: @Override public void init(JimConfig c)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (JimConfig c)
focal_class.return: void
focal_class.signature: void init(JimConfig c)
focal_class.class_method_signature: EtcdMetaStore.initRootPath()
focal_class.full_signature: private void initRootPath()
focal_class.identifier: initRootPath
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initRootPath()
focal_class.class_method_signature: EtcdMetaStore.allocMetaID()
focal_class.full_signature: @Override public int allocMetaID()
focal_class.identifier: allocMetaID
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int allocMetaID()
focal_class.class_method_signature: EtcdMetaStore.allocTaskID(TaskType type)
focal_class.full_signature: @Override public long allocTaskID(TaskType type)
focal_class.identifier: allocTaskID
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type)
focal_class.return: long
focal_class.signature: long allocTaskID(TaskType type)
focal_class.class_method_signature: EtcdMetaStore.addAndGetVersion(long incr)
focal_class.full_signature: @Override public long addAndGetVersion(long incr)
focal_class.identifier: addAndGetVersion
focal_class.modifiers: @Override public
focal_class.parameters: (long incr)
focal_class.return: long
focal_class.signature: long addAndGetVersion(long incr)
focal_class.class_method_signature: EtcdMetaStore.addAndGetPrivVersion(long incr)
focal_class.full_signature: @Override public long addAndGetPrivVersion(long incr)
focal_class.identifier: addAndGetPrivVersion
focal_class.modifiers: @Override public
focal_class.parameters: (long incr)
focal_class.return: long
focal_class.signature: long addAndGetPrivVersion(long incr)
focal_class.class_method_signature: EtcdMetaStore.register(long version)
focal_class.full_signature: @Override public void register(long version)
focal_class.identifier: register
focal_class.modifiers: @Override public
focal_class.parameters: (long version)
focal_class.return: void
focal_class.signature: void register(long version)
focal_class.class_method_signature: EtcdMetaStore.unRegister()
focal_class.full_signature: @Override public void unRegister()
focal_class.identifier: unRegister
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unRegister()
focal_class.class_method_signature: EtcdMetaStore.getRegisters()
focal_class.full_signature: @Override public Map<String, Long> getRegisters()
focal_class.identifier: getRegisters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, Long>
focal_class.signature: Map<String, Long> getRegisters()
focal_class.class_method_signature: EtcdMetaStore.storeCatalog(Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo)
focal_class.full_signature: @Override public boolean storeCatalog(Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo)
focal_class.identifier: storeCatalog
focal_class.modifiers: @Override public
focal_class.parameters: (Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo)
focal_class.return: boolean
focal_class.signature: boolean storeCatalog(Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo)
focal_class.class_method_signature: EtcdMetaStore.removeCatalog(int id)
focal_class.full_signature: @Override public boolean removeCatalog(int id)
focal_class.identifier: removeCatalog
focal_class.modifiers: @Override public
focal_class.parameters: (int id)
focal_class.return: boolean
focal_class.signature: boolean removeCatalog(int id)
focal_class.class_method_signature: EtcdMetaStore.getCatalog(int id)
focal_class.full_signature: @Override public Metapb.CatalogInfo getCatalog(int id)
focal_class.identifier: getCatalog
focal_class.modifiers: @Override public
focal_class.parameters: (int id)
focal_class.return: Metapb.CatalogInfo
focal_class.signature: Metapb.CatalogInfo getCatalog(int id)
focal_class.class_method_signature: EtcdMetaStore.getCatalogs()
focal_class.full_signature: @Override public List<Metapb.CatalogInfo> getCatalogs()
focal_class.identifier: getCatalogs
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Metapb.CatalogInfo>
focal_class.signature: List<Metapb.CatalogInfo> getCatalogs()
focal_class.class_method_signature: EtcdMetaStore.storeTable(Metapb.TableInfo expect, Metapb.TableInfo tableInfo)
focal_class.full_signature: @Override public boolean storeTable(Metapb.TableInfo expect, Metapb.TableInfo tableInfo)
focal_class.identifier: storeTable
focal_class.modifiers: @Override public
focal_class.parameters: (Metapb.TableInfo expect, Metapb.TableInfo tableInfo)
focal_class.return: boolean
focal_class.signature: boolean storeTable(Metapb.TableInfo expect, Metapb.TableInfo tableInfo)
focal_class.class_method_signature: EtcdMetaStore.removeTable(int dbID, int tableID)
focal_class.full_signature: @Override public boolean removeTable(int dbID, int tableID)
focal_class.identifier: removeTable
focal_class.modifiers: @Override public
focal_class.parameters: (int dbID, int tableID)
focal_class.return: boolean
focal_class.signature: boolean removeTable(int dbID, int tableID)
focal_class.class_method_signature: EtcdMetaStore.getTable(int catalogID, int tableID)
focal_class.full_signature: @Override public Metapb.TableInfo getTable(int catalogID, int tableID)
focal_class.identifier: getTable
focal_class.modifiers: @Override public
focal_class.parameters: (int catalogID, int tableID)
focal_class.return: Metapb.TableInfo
focal_class.signature: Metapb.TableInfo getTable(int catalogID, int tableID)
focal_class.class_method_signature: EtcdMetaStore.getTables(int catalogID)
focal_class.full_signature: @Override public List<Metapb.TableInfo> getTables(int catalogID)
focal_class.identifier: getTables
focal_class.modifiers: @Override public
focal_class.parameters: (int catalogID)
focal_class.return: List<Metapb.TableInfo>
focal_class.signature: List<Metapb.TableInfo> getTables(int catalogID)
focal_class.class_method_signature: EtcdMetaStore.getCatalogAndTables()
focal_class.full_signature: @Override public Map<Metapb.CatalogInfo, List<Metapb.TableInfo>> getCatalogAndTables()
focal_class.identifier: getCatalogAndTables
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<Metapb.CatalogInfo, List<Metapb.TableInfo>>
focal_class.signature: Map<Metapb.CatalogInfo, List<Metapb.TableInfo>> getCatalogAndTables()
focal_class.class_method_signature: EtcdMetaStore.getAutoIdInfo(int catalogID, int tableID)
focal_class.full_signature: @Override public Metapb.AutoIdInfo getAutoIdInfo(int catalogID, int tableID)
focal_class.identifier: getAutoIdInfo
focal_class.modifiers: @Override public
focal_class.parameters: (int catalogID, int tableID)
focal_class.return: Metapb.AutoIdInfo
focal_class.signature: Metapb.AutoIdInfo getAutoIdInfo(int catalogID, int tableID)
focal_class.class_method_signature: EtcdMetaStore.storeAutoIdInfo(int catalogID, int tableID, Metapb.AutoIdInfo autoIdInfo, Metapb.AutoIdInfo expect)
focal_class.full_signature: @Override public Metapb.AutoIdInfo storeAutoIdInfo(int catalogID, int tableID, Metapb.AutoIdInfo autoIdInfo, Metapb.AutoIdInfo expect)
focal_class.identifier: storeAutoIdInfo
focal_class.modifiers: @Override public
focal_class.parameters: (int catalogID, int tableID, Metapb.AutoIdInfo autoIdInfo, Metapb.AutoIdInfo expect)
focal_class.return: Metapb.AutoIdInfo
focal_class.signature: Metapb.AutoIdInfo storeAutoIdInfo(int catalogID, int tableID, Metapb.AutoIdInfo autoIdInfo, Metapb.AutoIdInfo expect)
focal_class.class_method_signature: EtcdMetaStore.storeTask(TaskType type, Task expect, Task... tasks)
focal_class.full_signature: @Override public boolean storeTask(TaskType type, Task expect, Task... tasks)
focal_class.identifier: storeTask
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, Task expect, Task... tasks)
focal_class.return: boolean
focal_class.signature: boolean storeTask(TaskType type, Task expect, Task... tasks)
focal_class.class_method_signature: EtcdMetaStore.storeIndexTask(Task expect, Task... tasks)
focal_class.full_signature: private boolean storeIndexTask(Task expect, Task... tasks)
focal_class.identifier: storeIndexTask
focal_class.modifiers: private
focal_class.parameters: (Task expect, Task... tasks)
focal_class.return: boolean
focal_class.signature: boolean storeIndexTask(Task expect, Task... tasks)
focal_class.class_method_signature: EtcdMetaStore.getTask(TaskType type, Task task)
focal_class.full_signature: @Override public Task getTask(TaskType type, Task task)
focal_class.identifier: getTask
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, Task task)
focal_class.return: Task
focal_class.signature: Task getTask(TaskType type, Task task)
focal_class.class_method_signature: EtcdMetaStore.getTasks(TaskType type, Task task)
focal_class.full_signature: @Override public List<Task> getTasks(TaskType type, Task task)
focal_class.identifier: getTasks
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, Task task)
focal_class.return: List<Task>
focal_class.signature: List<Task> getTasks(TaskType type, Task task)
focal_class.class_method_signature: EtcdMetaStore.removeTask(TaskType type, long taskId)
focal_class.full_signature: @Override public void removeTask(TaskType type, long taskId)
focal_class.identifier: removeTask
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, long taskId)
focal_class.return: void
focal_class.signature: void removeTask(TaskType type, long taskId)
focal_class.class_method_signature: EtcdMetaStore.tryLock(TaskType type, Task task)
focal_class.full_signature: @Override public boolean tryLock(TaskType type, Task task)
focal_class.identifier: tryLock
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, Task task)
focal_class.return: boolean
focal_class.signature: boolean tryLock(TaskType type, Task task)
focal_class.class_method_signature: EtcdMetaStore.unLock(TaskType type, Task task)
focal_class.full_signature: @Override public void unLock(TaskType type, Task task)
focal_class.identifier: unLock
focal_class.modifiers: @Override public
focal_class.parameters: (TaskType type, Task task)
focal_class.return: void
focal_class.signature: void unLock(TaskType type, Task task)
focal_class.class_method_signature: EtcdMetaStore.watch(WatchType type, LongConsumer consumer)
focal_class.full_signature: @Override public void watch(WatchType type, LongConsumer consumer)
focal_class.identifier: watch
focal_class.modifiers: @Override public
focal_class.parameters: (WatchType type, LongConsumer consumer)
focal_class.return: void
focal_class.signature: void watch(WatchType type, LongConsumer consumer)
focal_class.class_method_signature: EtcdMetaStore.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: @Override
    public List<Metapb.TableInfo> getTables(int catalogID) {
      List<Metapb.TableInfo> tableInfos = new ArrayList<>();
      Map<String, ByteSequence> kvs = etcdClient.listValues(String.format(TABLE_LIST, String.valueOf(catalogID)), false);
      if (kvs != null) {
        kvs.forEach((tk, tv) -> {
          try {
            tableInfos.add(Metapb.TableInfo.parseFrom(tv.getBytes()));
          } catch (Throwable e) {
            throw DBException.get(ErrorModule.META, ErrorCode.ER_META_STORE_ERROR, e, "Get tables");
          }
        });
      }
  
      Collections.sort(tableInfos, (c1, c2) -> {
        if (c1.getId() == c2.getId()) {
          return 0;
        }
        return c1.getId() > c2.getId() ? 1 : -1;
      });
      return tableInfos;
    }
focal_method.class_method_signature: EtcdMetaStore.getTables(int catalogID)
focal_method.full_signature: @Override public List<Metapb.TableInfo> getTables(int catalogID)
focal_method.identifier: getTables
focal_method.invocations: listValues format valueOf forEach add parseFrom getBytes get sort getId getId getId getId
focal_method.modifiers: @Override public
focal_method.parameters: (int catalogID)
focal_method.return: List<Metapb.TableInfo>
focal_method.signature: List<Metapb.TableInfo> getTables(int catalogID)