@Test public void get() throws Exception { String profileName = ProfileFactory.get(new TextInputFormat(), false); assertEquals("HiveText", profileName); profileName = ProfileFactory.get(new TextInputFormat(), true); assertEquals("Hive", profileName); profileName = ProfileFactory.get(new RCFileInputFormat(), true); assertEquals("HiveRC", profileName); profileName = ProfileFactory.get(new RCFileInputFormat(), false); assertEquals("HiveRC", profileName); profileName = ProfileFactory.get(new OrcInputFormat(), true); assertEquals("HiveORC", profileName); profileName = ProfileFactory.get(new OrcInputFormat(), false); assertEquals("HiveORC", profileName); profileName = ProfileFactory.get(new SequenceFileInputFilter(), false); assertEquals("Hive", profileName); }
public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) { String profileName = null; if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName)) return userProfileName; if (inputFormat instanceof TextInputFormat && !hasComplexTypes) { profileName = HIVE_TEXT_PROFILE; } else if (inputFormat instanceof RCFileInputFormat) { profileName = HIVE_RC_PROFILE; } else if (inputFormat instanceof OrcInputFormat) { profileName = HIVE_ORC_PROFILE; } else { profileName = HIVE_PROFILE; } return profileName; }
ProfileFactory { public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) { String profileName = null; if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName)) return userProfileName; if (inputFormat instanceof TextInputFormat && !hasComplexTypes) { profileName = HIVE_TEXT_PROFILE; } else if (inputFormat instanceof RCFileInputFormat) { profileName = HIVE_RC_PROFILE; } else if (inputFormat instanceof OrcInputFormat) { profileName = HIVE_ORC_PROFILE; } else { profileName = HIVE_PROFILE; } return profileName; } }
ProfileFactory { public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) { String profileName = null; if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName)) return userProfileName; if (inputFormat instanceof TextInputFormat && !hasComplexTypes) { profileName = HIVE_TEXT_PROFILE; } else if (inputFormat instanceof RCFileInputFormat) { profileName = HIVE_RC_PROFILE; } else if (inputFormat instanceof OrcInputFormat) { profileName = HIVE_ORC_PROFILE; } else { profileName = HIVE_PROFILE; } return profileName; }  }
ProfileFactory { public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) { String profileName = null; if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName)) return userProfileName; if (inputFormat instanceof TextInputFormat && !hasComplexTypes) { profileName = HIVE_TEXT_PROFILE; } else if (inputFormat instanceof RCFileInputFormat) { profileName = HIVE_RC_PROFILE; } else if (inputFormat instanceof OrcInputFormat) { profileName = HIVE_ORC_PROFILE; } else { profileName = HIVE_PROFILE; } return profileName; }  static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName); static String get(InputFormat inputFormat, boolean hasComplexTypes); }
ProfileFactory { public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) { String profileName = null; if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName)) return userProfileName; if (inputFormat instanceof TextInputFormat && !hasComplexTypes) { profileName = HIVE_TEXT_PROFILE; } else if (inputFormat instanceof RCFileInputFormat) { profileName = HIVE_RC_PROFILE; } else if (inputFormat instanceof OrcInputFormat) { profileName = HIVE_ORC_PROFILE; } else { profileName = HIVE_PROFILE; } return profileName; }  static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName); static String get(InputFormat inputFormat, boolean hasComplexTypes);  }