private void createDefaultUriProperties() { config = new LensConf(); config.addProperty(PATH_PREFIX + "hdfs", "://"); config.addProperty(PATH_PREFIX + "s3", "://"); config.addProperty(PATH_PREFIX + "s3n", "://"); }
/** * Parse value method * * @param s * @return parsed Priority from String s * @see RangeConf#parseValue(String) */ @Override protected Priority parseValue(String s) { return Priority.valueOf(s); }
@Override public String toString() { return toString(this); } }
/** * Instantiates a new prepared query context. * * @param query the query * @param user the user * @param conf the conf */ public PreparedQueryContext(String query, String user, Configuration conf, Collection<LensDriver> drivers) { this(query, user, conf, new LensConf(), drivers); }
@Override public String toString() { return "LensConnection{" + "sessionHandle=" + sessionHandle.getPublicId() + '}'; } }
/** * Default value is "NORMAL". Which implies {@link #get(Comparable)} will always return Priotity.NORMAL * * @return "NORMAL" */ @Override protected String getDefaultConf() { return Priority.NORMAL.toString(); } }
public static APIResult partial(Exception e) { String cause = extractCause(e); return new APIResult(Status.PARTIAL, cause); }
/** * Value of. * * @param sessionStr the session str * @return the lens session handle */ public static LensSessionHandle valueOf(String sessionStr) { return valueOf(sessionStr, LensSessionHandle.class); } }
private void createDefaultUriProperties() { config = new LensConf(); config.addProperty(PATH_PREFIX + "hdfs", "://"); config.addProperty(PATH_PREFIX + "s3", "://"); config.addProperty(PATH_PREFIX + "s3n", "://"); }
/** * Instantiates a new prepared query context. * * @param query the query * @param user the user * @param conf the conf */ public PreparedQueryContext(String query, String user, Configuration conf, Collection<LensDriver> drivers) { this(query, user, conf, new LensConf(), drivers); }
@Override public String toString() { return "LensConnection{" + "sessionHandle=" + sessionHandle.getPublicId() + '}'; } }
@Override public String toString() { return toString(this); } }
/** * Default value is "NORMAL". Which implies {@link #get(Comparable)} will always return Priotity.NORMAL * * @return "NORMAL" */ @Override protected String getDefaultConf() { return Priority.NORMAL.toString(); } }
/** * Parse value method * * @param s * @return parsed Priority from String s * @see RangeConf#parseValue(String) */ @Override protected Priority parseValue(String s) { return Priority.valueOf(s); }
public static APIResult partial(Exception e) { String cause = extractCause(e); return new APIResult(Status.PARTIAL, cause); }
/** * Value of. * * @param sessionStr the session str * @return the lens session handle */ public static LensSessionHandle valueOf(String sessionStr) { return valueOf(sessionStr, LensSessionHandle.class); } }
public static LensConf getLensConf(Object... args) { assert (args.length % 2 == 0); LensConf conf = new LensConf(); for (int i = 0; i < args.length; i += 2) { conf.addProperty(args[i], args[i + 1]); } return conf; } }