org.apache.flink.shaded.guava18.com.google.common.base.Strings Java Examples

The following examples show how to use org.apache.flink.shaded.guava18.com.google.common.base.Strings. 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 File: CassandraInputFormatBase.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
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 File: CassandraInputFormatBase.java    From flink with Apache License 2.0 5 votes vote down vote up
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 File: KafkaSink09.java    From sylph with Apache License 2.0 5 votes vote down vote up
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 File: CassandraInputFormatBase.java    From flink with Apache License 2.0 5 votes vote down vote up
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 File: FlinkPreparingTableBase.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * 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 File: ProcessPythonEnvironmentManager.java    From flink with Apache License 2.0 5 votes vote down vote up
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));
	}
}