public static Pair<String, String> getDbAndTableName(String tableName) throws IOException {
    String[] dbTableNametokens = tableName.split("\\.");
    if (dbTableNametokens.length == 1) {
      return new Pair<String, String>(Warehouse.DEFAULT_DATABASE_NAME, tableName);
    } else if (dbTableNametokens.length == 2) {
      return new Pair<String, String>(dbTableNametokens[0], dbTableNametokens[1]);
    } else {
      throw new IOException("tableName expected in the form "
        + "<databasename>.<table name> or <table name>. Got " + tableName);
    }
  }
Create an instance of a storage handler. If storageHandler == null,
then surrrogate StorageHandler is used to encapsulate the InputFormat, OutputFormat and SerDe.
This StorageHandler assumes the other supplied storage artifacts are for a file-based storage system.
@param conf job's configuration will be used to configure the Configurable StorageHandler
@param storageHandler fully qualified class name of the desired StorageHandle instance
@param serDe fully qualified class name of the desired SerDe instance
@param inputFormat fully qualified class name of the desired InputFormat instance
@param outputFormat fully qualified class name of the desired outputFormat instance
@return storageHandler instance
@throws IOException
hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatUtil.java