@JsonCreator public static CacheExecutorFactory from(String str) { return Enum.valueOf(CacheExecutorFactory.class, StringUtils.toUpperCase(str)); } }
@JsonCreator public static Action fromString(String name) { if (name == null) { return null; } return valueOf(StringUtils.toUpperCase(name)); } }
@JsonCreator public static ResourceType fromString(String name) { if (name == null) { return null; } return valueOf(StringUtils.toUpperCase(name)); } }
@JsonCreator public static AnalysisType fromString(String name) { return valueOf(StringUtils.toUpperCase(name)); }
@JsonCreator public static ValueType fromString(String name) { if (name == null) { return null; } return valueOf(StringUtils.toUpperCase(name)); }
@JsonCreator public static LongEncodingStrategy fromString(String name) { return valueOf(StringUtils.toUpperCase(name)); } }
public static Level toLevel(String name) { return Level.valueOf(StringUtils.toUpperCase(name)); } }
@JsonCreator public static ServerType fromString(String type) { return ServerType.valueOf(StringUtils.toUpperCase(type).replace("-", "_")); }
@JsonCreator public static NullHandling forValue(String value) { return value == null ? NULLSTRING : NullHandling.valueOf(StringUtils.toUpperCase(value)); }
@JsonCreator public static CompressionStrategy fromString(String name) { return valueOf(StringUtils.toUpperCase(name)); }
@JsonCreator public static JSONPathFieldType fromString(String name) { return valueOf(StringUtils.toUpperCase(name)); } }
@JsonCreator public static Granularity fromString(String str) { return GranularityType.valueOf(StringUtils.toUpperCase(str)).getDefaultGranularity(); }
@JsonCreator public NoopTask( @JsonProperty("id") String id, @JsonProperty("dataSource") String dataSource, @JsonProperty("runTime") long runTime, @JsonProperty("isReadyTime") long isReadyTime, @JsonProperty("isReadyResult") String isReadyResult, @JsonProperty("firehose") FirehoseFactory firehoseFactory, @JsonProperty("context") Map<String, Object> context ) { super( id == null ? StringUtils.format("noop_%s_%s", DateTimes.nowUtc(), UUID.randomUUID().toString()) : id, dataSource == null ? "none" : dataSource, context ); this.runTime = (runTime == 0) ? defaultRunTime : runTime; this.isReadyTime = (isReadyTime == 0) ? defaultIsReadyTime : isReadyTime; this.isReadyResult = (isReadyResult == null) ? defaultIsReadyResult : IsReadyResult.valueOf(StringUtils.toUpperCase(isReadyResult)); this.firehoseFactory = firehoseFactory; }
httpMap.put( "batchingStrategy", StringUtils.toUpperCase(props.getProperty("io.druid.java.util.emitter.http.batchingStrategy")) );
@Override public boolean tableExists(Handle handle, String tableName) { return !handle.createQuery("select * from SYS.SYSTABLES where tablename = :tableName") .bind("tableName", StringUtils.toUpperCase(tableName)) .list() .isEmpty(); }
@JsonCreator public static Direction fromString(String name) { final String upperName = StringUtils.toUpperCase(name); Direction direction = stupidEnumMap.get(upperName); if (direction == null) { for (Direction dir : Direction.values()) { if (dir.name().startsWith(upperName)) { if (direction != null) { throw new ISE("Ambiguous directions[%s] and [%s]", direction, dir); } direction = dir; } } } return direction; } }
final ValueType valueType; if (typeName != null) { valueType = GuavaUtils.getEnumIfPresent(ValueType.class, StringUtils.toUpperCase(typeName)); } else { valueType = null;
dumpType = DumpType.valueOf(StringUtils.toUpperCase(dumpTypeString));
final Unit unit = Unit.valueOf(StringUtils.toUpperCase((String) args.get(1).getLiteralValue())); final DateTimeZone timeZone;
@Override public HttpClient get() { final DruidHttpClientConfig config = getConfigProvider().get().get(); final HttpClientConfig.Builder builder = HttpClientConfig .builder() .withNumConnections(config.getNumConnections()) .withReadTimeout(config.getReadTimeout()) .withWorkerCount(config.getNumMaxThreads()) .withCompressionCodec( HttpClientConfig.CompressionCodec.valueOf(StringUtils.toUpperCase(config.getCompressionCodec())) ); if (getSslContextBinding() != null) { builder.withSslContext(getSslContextBinding().getProvider().get()); } HttpClient client = HttpClientInit.createClient( builder.build(), LifecycleUtils.asMmxLifecycle(getLifecycleProvider().get()) ); if (isEscalated) { return escalator.createEscalatedClient(client); } else { return client; } } }