use of lombok.ToString in project incubator-gobblin by apache.
the class HiveCopyEntityHelper method setCopyableFileDatasets.
/**
* Set the source and destination datasets of a copyable file
*/
void setCopyableFileDatasets(CopyableFile copyableFile) {
String sourceTable = dataset.getTable().getDbName() + "." + dataset.getTable().getTableName();
DatasetDescriptor source = new DatasetDescriptor(DatasetConstants.PLATFORM_HIVE, sourceTable);
source.addMetadata(DatasetConstants.FS_URI, dataset.getFs().getUri().toString());
copyableFile.setSourceDataset(source);
String destinationTable = this.getTargetDatabase() + "." + this.getTargetTable();
DatasetDescriptor destination = new DatasetDescriptor(DatasetConstants.PLATFORM_HIVE, destinationTable);
destination.addMetadata(DatasetConstants.FS_URI, this.getTargetFs().getUri().toString());
copyableFile.setDestinationDataset(destination);
}
use of lombok.ToString in project incubator-gobblin by apache.
the class AzkabanProjectConfig method constructProjectName.
public static String constructProjectName(JobSpec jobSpec, Config config) {
String projectNamePrefix = ConfigUtils.getString(config, ServiceAzkabanConfigKeys.AZKABAN_PROJECT_NAME_PREFIX_KEY, "");
String projectNamePostfix = null == jobSpec.getUri() ? "" : jobSpec.getUri().toString().replaceAll("_", "-").replaceAll("[^A-Za-z0-9\\-]", "_");
return trimProjectName(String.format("%s_%s", projectNamePrefix, projectNamePostfix));
}
use of lombok.ToString in project pravega by pravega.
the class InProcPravegaCluster method print.
// Assumes toString is autogenerated by Lombok.
public String print() {
String auto = this.toString();
int start = auto.indexOf("(") + 1;
int end = auto.indexOf(")");
String[] opts = auto.substring(start, end).split(",");
StringBuilder result = new StringBuilder(String.format("%s%n", auto.substring(0, start)));
for (String opt : opts) {
result.append(String.format("\t%s%n", opt.trim()));
}
result.append(auto.substring(end, auto.length()));
return result.toString();
}
Aggregations