當前位置: 首頁>>代碼示例>>Java>>正文


Java CreateHiveTableTool類代碼示例

本文整理匯總了Java中com.cloudera.sqoop.tool.CreateHiveTableTool的典型用法代碼示例。如果您正苦於以下問題:Java CreateHiveTableTool類的具體用法?Java CreateHiveTableTool怎麽用?Java CreateHiveTableTool使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CreateHiveTableTool類屬於com.cloudera.sqoop.tool包,在下文中一共展示了CreateHiveTableTool類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testCreateOverwriteHiveImport

import com.cloudera.sqoop.tool.CreateHiveTableTool; //導入依賴的package包/類
/**
 * Test that table is created in hive and replaces the existing table if
 * any.
 */
@Test
public void testCreateOverwriteHiveImport() throws IOException {
  final String TABLE_NAME = "CREATE_OVERWRITE_HIVE_IMPORT";
  setCurTableName(TABLE_NAME);
  setNumCols(3);
  String [] types = { "VARCHAR(32)", "INTEGER", "CHAR(64)" };
  String [] vals = { "'test'", "42", "'somestring'" };
  String [] extraArgs = {"--hive-overwrite", "--create-hive-table"};
  runImportTest(TABLE_NAME, types, vals,
      "createOverwriteImport.q", getCreateHiveTableArgs(extraArgs),
      new CreateHiveTableTool());
  runImportTest(TABLE_NAME, types, vals,
      "createOverwriteImport.q", getCreateHiveTableArgs(extraArgs),
      new CreateHiveTableTool());
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:20,代碼來源:TestHiveImport.java

示例2: testCreateOnlyHiveImport

import com.cloudera.sqoop.tool.CreateHiveTableTool; //導入依賴的package包/類
/** Test that table is created in hive with no data import. */
@Test
public void testCreateOnlyHiveImport() throws IOException {
  final String TABLE_NAME = "CREATE_ONLY_HIVE_IMPORT";
  setCurTableName(TABLE_NAME);
  setNumCols(3);
  String [] types = { "VARCHAR(32)", "INTEGER", "CHAR(64)" };
  String [] vals = { "'test'", "42", "'somestring'" };
  runImportTest(TABLE_NAME, types, vals,
      "createOnlyImport.q", getCreateHiveTableArgs(null),
      new CreateHiveTableTool());
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:13,代碼來源:TestHiveImport.java

示例3: testCreateOverwriteHiveImport

import com.cloudera.sqoop.tool.CreateHiveTableTool; //導入依賴的package包/類
/**
 * Test that table is created in hive and replaces the existing table if
 * any.
 */
@Test
public void testCreateOverwriteHiveImport() throws IOException {
  final String TABLE_NAME = "CREATE_OVERWRITE_HIVE_IMPORT";
  setCurTableName(TABLE_NAME);
  setNumCols(3);
  String [] types = { "VARCHAR(32)", "INTEGER", "CHAR(64)" };
  String [] vals = { "'test'", "42", "'somestring'" };
  String [] extraArgs = {"--hive-overwrite", "--create-hive-table"};
  runImportTest(TABLE_NAME, types, vals,
      "createOverwriteImport.q", getCreateHiveTableArgs(extraArgs),
      new CreateHiveTableTool());
}
 
開發者ID:unicredit,項目名稱:zSqoop,代碼行數:17,代碼來源:TestHiveImport.java


注:本文中的com.cloudera.sqoop.tool.CreateHiveTableTool類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。