List of usage examples for org.apache.hadoop.mapred InvalidInputException getMessage
public String getMessage()
From source file:org.apache.hawq.pxf.plugins.hive.HiveDataFragmenter.java
License:Apache License
private void fetchMetaData(HiveTablePartition tablePartition) throws Exception { InputFormat<?, ?> fformat = makeInputFormat(tablePartition.storageDesc.getInputFormat(), jobConf); FileInputFormat.setInputPaths(jobConf, new Path(tablePartition.storageDesc.getLocation())); InputSplit[] splits = null;/*w w w. ja va2s.com*/ try { splits = fformat.getSplits(jobConf, 1); } catch (org.apache.hadoop.mapred.InvalidInputException e) { LOG.debug("getSplits failed on " + e.getMessage()); return; } for (InputSplit split : splits) { FileSplit fsp = (FileSplit) split; String[] hosts = fsp.getLocations(); String filepath = fsp.getPath().toUri().getPath(); byte[] locationInfo = HdfsUtilities.prepareFragmentMetadata(fsp); Fragment fragment = new Fragment(filepath, hosts, locationInfo, makeUserData(tablePartition)); fragments.add(fragment); } }