Examples of enableTable()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    String tableName = "testRandomAssignmentDuringIndexTableEnable";
    String indexTableName =
        "testRandomAssignmentDuringIndexTableEnable" + Constants.INDEX_TABLE_SUFFIX;
    admin.disableTable(tableName);
    admin.enableTable(tableName);
    boolean isRegionColocated = checkForColocation(master, tableName, indexTableName);
    assertTrue("User regions and index regions should colocate.", isRegionColocated);

  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    admin.createTable(htd, split1);
    String tableName = "testBalanceClusterFromAdminBalancer";
    String indexTableName = "testBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
    admin.disableTable(tableName);
    admin.enableTable(tableName);
    admin.balanceSwitch(true);
    admin.balancer();
    boolean isRegionsColocated = checkForColocation(master, tableName, indexTableName);
    assertTrue("User regions and index regions should colocate.", isRegionsColocated);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

         admin.createTable(desc);
      }

      if (admin.isTableDisabled(table2)) {
         admin.enableTable(table2);
      }

      TransactionalTable tt2 = new TransactionalTable(conf, table2);

      TransactionState t1 = tm.beginTransaction();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

          LOG.info("Waiting on table to finish disabling");
        }
        byte[][] newStartKeys = generateRandomStartKeys(15);
        util.createMultiRegions(
            util.getConfiguration(), table, FAMILIES[0], newStartKeys);
        admin.enableTable(table.getTableName());
        while (table.getRegionLocations().size() != 15 ||
            !admin.isTableAvailable(table.getTableName())) {
          Thread.sleep(200);
          LOG.info("Waiting for new region assignment to happen");
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      admin.disableTable(TABLE_NAME);
      while (!admin.isTableDisabled(TABLE_NAME)) {
        Thread.sleep(200);
        LOG.info("Waiting for table to disable");
      }
      admin.enableTable(TABLE_NAME);
      util.waitTableAvailable(TABLE_NAME.getName());
      assertEquals("Data should remain after reopening of regions",
          tableDigestBefore, util.checksumRows(table));
    } finally {
      if (admin != null) admin.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      HTable table = util.createTable(tname, FAMILIES);
      HBaseAdmin admin = new HBaseAdmin(conf);
      admin.disableTable(tname);
      byte[][] startKeys = generateRandomStartKeys(5);
      util.createMultiRegions(conf, table, FAMILIES[0], startKeys);
      admin.enableTable(tname);
    } else if ("incremental".equals(args[0])) {
      byte[] tname = args[1].getBytes();
      HTable table = new HTable(conf, tname);
      Path outDir = new Path("incremental-out");
      runIncrementalPELoad(conf, table, outDir);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      HTableDescriptor htd = admin.getTableDescriptor(table);
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table, htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);

      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table); // warms up cached htd on master
      hbck = doFsck(conf, true);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

                if (oldDescriptor == null) {
                    admin.addColumn(tableName, columnDescriptor);
                } else {
                    admin.modifyColumn(tableName, columnDescriptor);
                }
                admin.enableTable(tableName);
            } catch (org.apache.hadoop.hbase.TableNotFoundException e) {
                sqlE = new SQLExceptionInfo.Builder(SQLExceptionCode.TABLE_UNDEFINED).setRootCause(e).build().buildException();
            }
        } catch (IOException e) {
            sqlE = ServerUtil.parseServerException(e);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

                     * "ghost" state where it can't be used and can't be deleted without bouncing the master.
                     */
                    newDesc.setValue(HTableDescriptor.SPLIT_POLICY, MetaDataSplitPolicy.class.getName());
                    admin.disableTable(tableName);
                    admin.modifyTable(tableName, newDesc);
                    admin.enableTable(tableName);
                }
                return null;
            } else {
                if (!modifyExistingMetaData || existingDesc.equals(newDesc)) {
                    // Table is already created. Note that the presplits are ignored in this case
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

                }
                        
                // TODO: Take advantage of online schema change ability by setting "hbase.online.schema.update.enable" to true
                admin.disableTable(tableName);
                admin.modifyTable(tableName, newDesc);
                admin.enableTable(tableName);
               
                return newDesc;
            }

        } catch (IOException e) {
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.