コード例 #1
0
  @Test
  public void testCDH510MR1Distribution() throws Exception {
    HadoopComponent distribution = new CDH510MR1Distribution();
    assertNotNull(distribution.getDistributionName());
    assertNotNull(distribution.getVersionName(null));
    assertFalse(distribution.doSupportS3());
    assertEquals(CDH510MR1Distribution.DISTRIBUTION_NAME, distribution.getDistribution());
    assertEquals(CDH510MR1Distribution.VERSION, distribution.getVersion());
    assertEquals(EHadoopVersion.HADOOP_1, distribution.getHadoopVersion());
    assertTrue(distribution.doSupportKerberos());
    assertFalse(distribution.doSupportUseDatanodeHostname());
    assertFalse(distribution.doSupportGroup());
    assertTrue(distribution.doSupportOldImportMode());
    assertTrue(((HDFSComponent) distribution).doSupportSequenceFileShortType());
    assertFalse(((MRComponent) distribution).isExecutedThroughWebHCat());
    assertFalse(((MRComponent) distribution).doSupportCrossPlatformSubmission());
    assertTrue(((MRComponent) distribution).doSupportImpersonation());
    assertEquals(EMPTY, ((MRComponent) distribution).getYarnApplicationClasspath());
    assertTrue(((HBaseComponent) distribution).doSupportNewHBaseAPI());
    assertFalse(((SqoopComponent) distribution).doJavaAPISupportStorePasswordInFile());
    assertTrue(((SqoopComponent) distribution).doJavaAPISqoopImportSupportDeleteTargetDir());
    assertFalse(((SqoopComponent) distribution).doJavaAPISqoopImportAllTablesSupportExcludeTable());
    assertTrue(((PigComponent) distribution).doSupportHCatalog());
    assertFalse(((PigComponent) distribution).pigVersionPriorTo_0_12());
    assertTrue(((PigComponent) distribution).doSupportHBase());
    assertFalse(((PigComponent) distribution).doSupportTezForPig());
    assertTrue(((HiveComponent) distribution).doSupportEmbeddedMode());
    assertTrue(((HiveComponent) distribution).doSupportStandaloneMode());
    assertTrue(((HiveComponent) distribution).doSupportHive1());
    assertTrue(((HiveComponent) distribution).doSupportHive2());
    assertFalse(((HiveComponent) distribution).doSupportTezForHive());
    assertTrue(((HiveComponent) distribution).doSupportHBaseForHive());
    assertTrue(((HiveComponent) distribution).doSupportSSL());
    assertTrue(((HiveComponent) distribution).doSupportORCFormat());
    assertTrue(((HiveComponent) distribution).doSupportAvroFormat());
    assertTrue(((HiveComponent) distribution).doSupportParquetFormat());
    assertFalse(((HiveComponent) distribution).doSupportStoreAsParquet());
    assertFalse(((HiveComponent) distribution).doSupportClouderaNavigator());

    assertFalse(distribution instanceof SparkBatchComponent);
    assertFalse(distribution instanceof SparkStreamingComponent);
    assertTrue(distribution instanceof HCatalogComponent);
    assertFalse(distribution instanceof ImpalaComponent);
  }
コード例 #2
0
 @Test
 public void testEMR450Distribution() throws Exception {
   HadoopComponent distribution = new EMR450Distribution();
   assertNotNull(distribution.getDistributionName());
   assertNotNull(distribution.getVersionName(null));
   assertTrue(distribution.doSupportS3());
   assertEquals(EMR450Distribution.DISTRIBUTION_NAME, distribution.getDistribution());
   assertEquals(EMR450Distribution.VERSION, distribution.getVersion());
   assertEquals(EHadoopVersion.HADOOP_2, distribution.getHadoopVersion());
   assertFalse(distribution.doSupportKerberos());
   assertTrue(distribution.doSupportUseDatanodeHostname());
   assertFalse(distribution.doSupportGroup());
   assertFalse(distribution.doSupportOldImportMode());
   assertTrue(((HDFSComponent) distribution).doSupportSequenceFileShortType());
   assertFalse(((MRComponent) distribution).isExecutedThroughWebHCat());
   assertTrue(((MRComponent) distribution).doSupportCrossPlatformSubmission());
   assertTrue(((MRComponent) distribution).doSupportImpersonation());
   assertEquals(
       ((MRComponent) distribution).getYarnApplicationClasspath(),
       DEFAULT_YARN_APPLICATION_CLASSPATH);
   assertFalse(distribution instanceof HBaseComponent);
   assertTrue(distribution instanceof SqoopComponent);
   assertTrue(((PigComponent) distribution).doSupportHCatalog());
   assertFalse(((PigComponent) distribution).pigVersionPriorTo_0_12());
   assertFalse(((PigComponent) distribution).doSupportHBase());
   assertFalse(((PigComponent) distribution).doSupportTezForPig());
   assertFalse(((HiveComponent) distribution).doSupportEmbeddedMode());
   assertTrue(((HiveComponent) distribution).doSupportStandaloneMode());
   assertFalse(((HiveComponent) distribution).doSupportHive1());
   assertTrue(((HiveComponent) distribution).doSupportHive2());
   assertFalse(((HiveComponent) distribution).doSupportTezForHive());
   assertFalse(((HiveComponent) distribution).doSupportHBaseForHive());
   assertTrue(((HiveComponent) distribution).doSupportSSL());
   assertTrue(((HiveComponent) distribution).doSupportORCFormat());
   assertTrue(((HiveComponent) distribution).doSupportAvroFormat());
   assertTrue(((HiveComponent) distribution).doSupportParquetFormat());
   assertTrue(((SparkBatchComponent) distribution).isSpark16());
   assertFalse(((SparkBatchComponent) distribution).isSpark15());
   assertFalse(((SparkBatchComponent) distribution).isSpark14());
   assertFalse(((SparkBatchComponent) distribution).isSpark13());
   assertTrue(((SparkBatchComponent) distribution).doSupportDynamicMemoryAllocation());
   assertFalse(((SparkBatchComponent) distribution).isExecutedThroughSparkJobServer());
   assertFalse(((SparkBatchComponent) distribution).doSupportSparkStandaloneMode());
   assertTrue(((SparkBatchComponent) distribution).doSupportSparkYarnClientMode());
   assertTrue(((SparkStreamingComponent) distribution).isSpark16());
   assertFalse(((SparkStreamingComponent) distribution).isSpark15());
   assertFalse(((SparkStreamingComponent) distribution).isSpark14());
   assertFalse(((SparkStreamingComponent) distribution).isSpark13());
   assertTrue(((SparkStreamingComponent) distribution).doSupportDynamicMemoryAllocation());
   assertFalse(((SparkStreamingComponent) distribution).isExecutedThroughSparkJobServer());
   assertTrue(((SparkStreamingComponent) distribution).doSupportCheckpointing());
   assertFalse(((SparkStreamingComponent) distribution).doSupportSparkStandaloneMode());
   assertTrue(((SparkStreamingComponent) distribution).doSupportSparkYarnClientMode());
   assertTrue(((SparkStreamingComponent) distribution).doSupportBackpressure());
   assertTrue(((HiveComponent) distribution).doSupportStoreAsParquet());
   assertFalse(((HiveComponent) distribution).doSupportClouderaNavigator());
   assertTrue(distribution instanceof HCatalogComponent);
   assertFalse(distribution instanceof ImpalaComponent);
   assertTrue(((SqoopComponent) distribution).doJavaAPISqoopImportAllTablesSupportExcludeTable());
   assertTrue(((SqoopComponent) distribution).doJavaAPISqoopImportSupportDeleteTargetDir());
   assertTrue(((SqoopComponent) distribution).doJavaAPISupportStorePasswordInFile());
 }