/** * A best effort attempt to determine if if the file is a local file * @param conf * @param fileName * @return true if it was successfully able to determine that it is a local file */ public static boolean isLocalFile(HiveConf conf, String fileName) { try { // do best effort to determine if this is a local file return isLocalFile(conf, new URI(fileName)); } catch (URISyntaxException e) { LOG.warn("Unable to create URI from " + fileName, e); } return false; }
public static WriteEntity toWriteEntity(Path location, HiveConf conf) throws SemanticException { try { Path path = tryQualifyPath(location,conf); return new WriteEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }
public static ReadEntity toReadEntity(Path location, HiveConf conf) throws SemanticException { try { Path path = tryQualifyPath(location, conf); return new ReadEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }
public static WriteEntity toWriteEntity(Path location, HiveConf conf) throws SemanticException { try { Path path = tryQualifyPath(location,conf); return new WriteEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }
public static ReadEntity toReadEntity(Path location, HiveConf conf) throws SemanticException { try { Path path = tryQualifyPath(location, conf); return new ReadEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }
/** * A best effort attempt to determine if if the file is a local file * @param conf * @param fileName * @return true if it was successfully able to determine that it is a local file */ public static boolean isLocalFile(HiveConf conf, String fileName) { try { // do best effort to determine if this is a local file return isLocalFile(conf, new URI(fileName)); } catch (URISyntaxException e) { LOG.warn("Unable to create URI from " + fileName, e); } return false; }
/** * A best effort attempt to determine if if the file is a local file * @param conf * @param fileName * @return true if it was successfully able to determine that it is a local file */ public static boolean isLocalFile(HiveConf conf, String fileName) { try { // do best effort to determine if this is a local file return isLocalFile(conf, new URI(fileName)); } catch (URISyntaxException e) { LOG.warn("Unable to create URI from " + fileName, e); } return false; }
protected ReadEntity toReadEntity(Path location) throws SemanticException { try { Path path = tryQualifyPath(location); return new ReadEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }
protected WriteEntity toWriteEntity(Path location) throws SemanticException { try { Path path = tryQualifyPath(location); return new WriteEntity(path, FileUtils.isLocalFile(conf, path.toUri())); } catch (Exception e) { throw new SemanticException(e); } }