Search in sources :

Example 26 with ToString

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);
}
Also used : DatasetDescriptor(org.apache.gobblin.dataset.DatasetDescriptor) ToString(lombok.ToString)

Example 27 with ToString

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));
}
Also used : ToString(lombok.ToString)

Example 28 with ToString

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();
}
Also used : ToString(lombok.ToString)

Aggregations

ToString (lombok.ToString)28 Map (java.util.Map)6 HashMap (java.util.HashMap)5 List (java.util.List)4 HashSet (java.util.HashSet)3 EclipseNode (lombok.eclipse.EclipseNode)3 Slf4j (lombok.extern.slf4j.Slf4j)3 lombok.val (lombok.val)3 JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)2 Github (com.jcabi.github.Github)2 JCVariableDecl (com.sun.tools.javac.tree.JCTree.JCVariableDecl)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 LinkedHashMap (java.util.LinkedHashMap)2 Optional (java.util.Optional)2 Collectors (java.util.stream.Collectors)2 Collectors.toList (java.util.stream.Collectors.toList)2 Collectors.toMap (java.util.stream.Collectors.toMap)2 Getter (lombok.Getter)2