@Override public Object clone() { TableDesc ret = new TableDesc(); ret.setInputFileFormatClass(inputFileFormatClass); ret.setOutputFileFormatClass(outputFileFormatClass); Properties newProp = new Properties(); Enumeration<Object> keysProp = properties.keys(); while (keysProp.hasMoreElements()) { Object key = keysProp.nextElement(); newProp.put(key, properties.get(key)); } ret.setProperties(newProp); if (jobProperties != null) { ret.jobProperties = new LinkedHashMap<String, String>(jobProperties); } return ret; }
@Override public Object clone() { TableDesc ret = new TableDesc(); ret.setInputFileFormatClass(inputFileFormatClass); ret.setOutputFileFormatClass(outputFileFormatClass); Properties newProp = new Properties(); Enumeration<Object> keysProp = properties.keys(); while (keysProp.hasMoreElements()) { Object key = keysProp.nextElement(); newProp.put(key, properties.get(key)); } ret.setProperties(newProp); if (jobProperties != null) { ret.jobProperties = new LinkedHashMap<String, String>(jobProperties); } return ret; }
(Class<? extends HiveOutputFormat>)JavaUtils.loadClass(crtViewDesc.getOutputFormat()); ret.setInputFileFormatClass(inClass); ret.setOutputFileFormatClass(outClass); } catch (ClassNotFoundException e) {
public void testAvoidSplitCombination() throws Exception { Configuration conf = new Configuration(); JobConf job = new JobConf(conf); TableDesc tblDesc = Utilities.defaultTd; tblDesc.setInputFileFormatClass(TestSkipCombineInputFormat.class); PartitionDesc partDesc = new PartitionDesc(tblDesc, null); LinkedHashMap<Path, PartitionDesc> pt = new LinkedHashMap<>(); pt.put(new Path("/tmp/testfolder1"), partDesc); pt.put(new Path("/tmp/testfolder2"), partDesc); MapredWork mrwork = new MapredWork(); mrwork.getMapWork().setPathToPartitionInfo(pt); Path mapWorkPath = new Path("/tmp/" + System.getProperty("user.name"), "hive"); Utilities.setMapRedWork(conf, mrwork, mapWorkPath); try { Path[] paths = new Path[2]; paths[0] = new Path("/tmp/testfolder1"); paths[1] = new Path("/tmp/testfolder2"); CombineHiveInputFormat combineInputFormat = ReflectionUtils.newInstance(CombineHiveInputFormat.class, conf); combineInputFormat.pathToPartitionInfo = Utilities.getMapWork(conf).getPathToPartitionInfo(); Set results = combineInputFormat.getNonCombinablePathIndices(job, paths, 2); assertEquals("Should have both path indices in the results set", 2, results.size()); } finally { // Cleanup the mapwork path FileSystem.get(conf).delete(mapWorkPath, true); } }
ret.setInputFileFormatClass(JavaUtils.loadClass(directoryDesc.getInputFormat()));
out_class = JavaUtils.loadClass(crtViewDesc.getOutputFormat()); ret.setInputFileFormatClass(in_class); ret.setOutputFileFormatClass(out_class); } catch (ClassNotFoundException e) {
out_class = JavaUtils.loadClass(crtTblDesc.getOutputFormat()); ret.setInputFileFormatClass(in_class); ret.setOutputFileFormatClass(out_class); } catch (ClassNotFoundException e) {
out_class = JavaUtils.loadClass(crtTblDesc.getOutputFormat()); ret.setInputFileFormatClass(in_class); ret.setOutputFileFormatClass(out_class); } catch (ClassNotFoundException e) {
tableDesc.setInputFileFormatClass((Class<? extends InputFormat>) inputFormatClass);
@Override public Object clone() { TableDesc ret = new TableDesc(); ret.setInputFileFormatClass(inputFileFormatClass); ret.setOutputFileFormatClass(outputFileFormatClass); Properties newProp = new Properties(); Enumeration<Object> keysProp = properties.keys(); while (keysProp.hasMoreElements()) { Object key = keysProp.nextElement(); newProp.put(key, properties.get(key)); } ret.setProperties(newProp); if (jobProperties != null) { ret.jobProperties = new LinkedHashMap<String, String>(jobProperties); } return ret; }
@Override public Object clone() { TableDesc ret = new TableDesc(); ret.setSerdeClassName(serdeClassName); ret.setDeserializerClass(deserializerClass); ret.setInputFileFormatClass(inputFileFormatClass); ret.setOutputFileFormatClass(outputFileFormatClass); Properties newProp = new Properties(); Enumeration<Object> keysProp = properties.keys(); while (keysProp.hasMoreElements()) { Object key = keysProp.nextElement(); newProp.put(key, properties.get(key)); } ret.setProperties(newProp); if (jobProperties != null) { ret.jobProperties = new LinkedHashMap<String, String>(jobProperties); } return ret; } }
Class<? extends HiveOutputFormat> out_class = c2; ret.setInputFileFormatClass(in_class); ret.setOutputFileFormatClass(out_class); } catch (ClassNotFoundException e) {
Class<? extends HiveOutputFormat> out_class = c2; ret.setInputFileFormatClass(in_class); ret.setOutputFileFormatClass(out_class); } catch (ClassNotFoundException e) {