Examples of tableExists()


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

    }
   
    private void deleteTable() throws IOException {
        // delete the table
        HBaseAdmin admin = new HBaseAdmin(conf);
        if(admin.tableExists(TESTTABLE)) {
            admin.disableTable(TESTTABLE);
            while(admin.isTableEnabled(TESTTABLE)) {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
View Full Code Here

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

        + "TBLPROPERTIES ('hbase.columns.mapping'=':key,cf1:val')");

    assertEquals(0, response.getResponseCode());

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists("test_table");
    assertTrue(doesTableExist);


    ZKUtil zkutil = new ZKUtil(sb.toString(), "/rm_base");
    ZooKeeper zk = zkutil.getSession();
View Full Code Here

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

    assertEquals(0, responseOne.getResponseCode());
    CommandProcessorResponse responseTwo = hcatDriver.run(tableQuery);
    assertEquals(0, responseTwo.getResponseCode());

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists(hbaseTableName);
    assertTrue(doesTableExist);

    populateHBaseTable(hbaseTableName, 5);
    Configuration conf = new Configuration(hcatConf);
    conf.set(HCatConstants.HCAT_KEY_HIVE_CONF,
View Full Code Here

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

    String dropTableQuery = "DROP TABLE " + hbaseTableName;
    CommandProcessorResponse responseThree = hcatDriver.run(dropTableQuery);
    assertEquals(0, responseThree.getResponseCode());

    boolean isHbaseTableThere = hAdmin.tableExists(hbaseTableName);
    assertFalse(isHbaseTableThere);

    String dropDB = "DROP DATABASE " + databaseName;
    CommandProcessorResponse responseFour = hcatDriver.run(dropDB);
    assertEquals(0, responseFour.getResponseCode());
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.tableExists()

    @Test
    public void simpleTable() throws HBqlException {

        HConnection connection = HConnectionManager.newConnection();

        assertFalse(connection.tableExists("zzz"));

        String tableName = "tabletest1";
        if (connection.tableExists(tableName)) {
            connection.disableTable(tableName);
            connection.dropTable(tableName);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.MetaStoreClient.tableExists()

    }

    try {
      MetaStoreClient msc = new MetaStoreClient(ss.getConf());
     
      if(!msc.tableExists(table_name)) {
        ss.err.println("table does not exist: " + table_name);
        return 1;
      } else {
        List<FieldSchema> fields = msc.get_fields(table_name);
View Full Code Here

Examples of org.dbunit.database.IMetadataHandler.tableExists()

        ResultSet rs = null;
        try {
            IMetadataHandler metadataHandler = (IMetadataHandler)
                    this.connection.getConfig().getProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER);
            // Validate if the table exists
            if(!metadataHandler.tableExists(metaData, schema, tableName))
            {
                throw new NoSuchTableException("The table '"+tableName+"' does not exist in schema '"+schema+"'");
            }

            switch (type) {
View Full Code Here

Examples of org.lilyproject.repository.api.TableManager.tableExists()

    @DELETE
    @Path("{name}")
    public Response dropTable(@PathParam("name") String tableName, @Context UriInfo uriInfo) {
        try {
            TableManager tableManager = getRepository(uriInfo).getTableManager();
            if (!tableManager.tableExists(tableName)) {
                throw new ResourceException("Table '" + tableName + "' not found", NOT_FOUND.getStatusCode());
            }
            tableManager.dropTable(tableName);
            return Response.ok().build();
        } catch (IOException ioe) {
View Full Code Here

Examples of org.lilyproject.repository.impl.TableManagerImpl.tableExists()

        repositoryManager = new HBaseRepositoryManager(typeManager, idGenerator,
                new RecordFactoryImpl(), hbaseTableFactory, blobManager, configuration, repositoryModel);

        TableManager repoTableManager =
                new TableManagerImpl(/* TODO multiple repositories */ "default", configuration, hbaseTableFactory);
        if (!repoTableManager.tableExists(Table.RECORD.name)) {
            repoTableManager.createTable(Table.RECORD.name);
        }

        repository = (Repository) repositoryManager.getDefaultRepository().getDefaultTable();
        table = repository.getDefaultTable();
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.