Examples of listTables()


Examples of com.cloudera.sqoop.manager.ConnManager.listTables()

        NetezzaTestUtils.getNZConnectString(), getTableName());
    options.setUsername(NetezzaTestUtils.getNZUser());
    options.setPassword(NetezzaTestUtils.getNZPassword());

    ConnManager mgr = new NetezzaManager(options);
    String[] tables = mgr.listTables();
    Arrays.sort(tables);
    assertTrue(getTableName() + " is not found!",
        Arrays.binarySearch(tables, getTableName()) >= 0);
  }
View Full Code Here

Examples of com.cloudera.sqoop.manager.HsqldbManager.listTables()

  public static void resetSchema(SqoopOptions options) throws SQLException {
    HsqldbManager manager = new HsqldbManager(options);
    Connection c = manager.getConnection();
    Statement s = c.createStatement();
    try {
      String [] tables = manager.listTables();
      for (String table : tables) {
        s.executeUpdate("DROP TABLE " + table);
      }

      c.commit();
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseAdmin.listTables()

    }
    try {
      HBaseAdmin admin = new HBaseAdmin(conf);
      int tableLength = 0;
      if ("tables".equals(this.command)) {
        HTableDescriptor[] tables = admin.listTables();
        tableLength = tables.length;
        if (tableLength == 0) {
          return new ReturnMsg(0, "No tables found");
        }
        formatter.header(HEADER);
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseAdmin.listTables()

      return new ReturnMsg(0, "Syntax error : Please check 'Show' syntax.");
    }
    try {
      HBaseAdmin admin = new HBaseAdmin(conf);
      int tableLength = 0;
      HTableDescriptor[] tables = admin.listTables();
      tableLength = tables.length;
      if (tableLength == 0) {
        return new ReturnMsg(0, "No tables found.");
      }
      formatter.header(HEADER);
View Full Code Here

Examples of org.apache.hadoop.hbase.HConnection.listTables()

    try {
      HConnection conn = HConnectionManager.getConnection(conf);
      if (!conn.tableExists(this.tableName)) {
        return new ReturnMsg(0, "Table not found");
      }
      HTableDescriptor [] tables = conn.listTables();
      HColumnDescriptor [] columns = null;
      for (int i = 0; i < tables.length; i++) {
        if (tables[i].getName().equals(this.tableName)) {
          columns = tables[i].getFamilies().values().
            toArray(new HColumnDescriptor [] {});
View Full Code Here

Examples of org.apache.hadoop.hbase.HConnection.listTables()

    try {
      HConnection conn = HConnectionManager.getConnection(conf);
      if (!conn.tableExists(tableName)) {
        return new ReturnMsg(0, "Table not found.");
      }
      HTableDescriptor[] tables = conn.listTables();
      HColumnDescriptor[] columns = null;
      for (int i = 0; i < tables.length; i++) {
        if (tables[i].getName().equals(tableName)) {
          columns = tables[i].getFamilies().values().toArray(
              new HColumnDescriptor[] {});
View Full Code Here

Examples of org.apache.hadoop.hbase.HConnection.listTables()

      if (!conn.tableExists(tableName)) {
        return new ReturnMsg(0, "Table not found.");
      }

      HTableDescriptor[] tables = conn.listTables();
      HColumnDescriptor[] columns = null;
      for (int i = 0; i < tables.length; i++) {
        if (tables[i].getName().equals(tableName)) {
          columns = tables[i].getFamilies().values().toArray(
              new HColumnDescriptor[] {});
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Admin.listTables()

      BlockingInterface protocol =
          AccessControlProtos.AccessControlService.newBlockingStub(service);
      HTableDescriptor[] htds = null;
     
      if (tableRegex != null) {
        htds = ha.listTables(Pattern.compile(tableRegex));
        for (HTableDescriptor hd: htds) {
          permList.addAll(ProtobufUtil.getUserPermissions(protocol, hd.getTableName()));
        }
      } else {
        permList = ProtobufUtil.getUserPermissions(protocol);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Admin.listTables()

    AccessTestAction listTablesAction = new AccessTestAction() {
      @Override
      public Object run() throws Exception {
        Admin admin = TEST_UTIL.getHBaseAdmin();
        try {
          admin.listTables();
        } finally {
          admin.close();
        }
        return null;
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Admin.listTables()

    AccessTestAction listTablesAction = new AccessTestAction() {
      @Override
      public Object run() throws Exception {
        Admin admin = TEST_UTIL.getHBaseAdmin();
        try {
          admin.listTables();
        } finally {
          admin.close();
        }
        return null;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.