Java Code Examples for org.apache.flink.shaded.guava18.com.google.common.base.Strings
The following examples show how to use
org.apache.flink.shaded.guava18.com.google.common.base.Strings. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus Source File: CassandraInputFormatBase.java License: Apache License 2.0 | 5 votes |
public CassandraInputFormatBase(String query, ClusterBuilder builder){ Preconditions.checkArgument(!Strings.isNullOrEmpty(query), "Query cannot be null or empty"); Preconditions.checkNotNull(builder, "Builder cannot be null"); this.query = query; this.builder = builder; }
Example 2
Source Project: flink Source File: CassandraInputFormatBase.java License: Apache License 2.0 | 5 votes |
public CassandraInputFormatBase(String query, ClusterBuilder builder){ Preconditions.checkArgument(!Strings.isNullOrEmpty(query), "Query cannot be null or empty"); Preconditions.checkNotNull(builder, "Builder cannot be null"); this.query = query; this.builder = builder; }
Example 3
Source Project: sylph Source File: KafkaSink09.java License: Apache License 2.0 | 5 votes |
public KafkaSink09(SinkContext context, Kafka09SinkConfig config) { schema = context.getSchema(); if (!Strings.isNullOrEmpty(config.idField)) { int fieldIndex = schema.getFieldIndex(config.idField); checkState(fieldIndex != -1, config.idField + " does not exist, only " + schema.getFields()); this.idIndex = fieldIndex; } this.config = config; this.topic = config.topics; }
Example 4
Source Project: flink Source File: CassandraInputFormatBase.java License: Apache License 2.0 | 5 votes |
public CassandraInputFormatBase(String query, ClusterBuilder builder){ Preconditions.checkArgument(!Strings.isNullOrEmpty(query), "Query cannot be null or empty"); Preconditions.checkNotNull(builder, "Builder cannot be null"); this.query = query; this.builder = builder; }
Example 5
Source Project: flink Source File: FlinkPreparingTableBase.java License: Apache License 2.0 | 5 votes |
/** * Returns the digest of the {@link TableSource} instance. */ protected List<String> explainSourceAsString(TableSource<?> ts) { String tsDigest = ts.explainSource(); if (!Strings.isNullOrEmpty(tsDigest)) { return ImmutableList.<String>builder() .addAll(Util.skipLast(names)) .add(String.format("%s, source: [%s]", Util.last(names), tsDigest)) .build(); } else { return names; } }
Example 6
Source Project: flink Source File: ProcessPythonEnvironmentManager.java License: Apache License 2.0 | 5 votes |
private static void appendToPythonPath(Map<String, String> env, List<String> pythonDependencies) { if (pythonDependencies.isEmpty()) { return; } String pythonDependencyPath = String.join(File.pathSeparator, pythonDependencies); String pythonPath = env.get("PYTHONPATH"); if (Strings.isNullOrEmpty(pythonPath)) { env.put("PYTHONPATH", pythonDependencyPath); } else { env.put("PYTHONPATH", String.join(File.pathSeparator, pythonDependencyPath, pythonPath)); } }