Skip to content

Commit e7ed9cd

Browse files
author
Chris Li
committed
More documentation and remove lombok
1 parent 59db0f2 commit e7ed9cd

File tree

143 files changed

+2906
-1141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2906
-1141
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,25 @@ If building the distribution with tests turned on:
3232
To contribute, please use submit Pull Request (PR) for committers to merge.
3333
- Create your own fork on GitHub off the main repository
3434
- Clone your fork to your local computer
35-
>- `git clone https://github.com/<<your-github-login>>/data-integration-library.git`
35+
- `git clone https://github.com/<<your-github-login>>/data-integration-library.git`
3636
- Add upstream and verify
37-
>- `git remote add upstream https://github.com/linkedin/data-integration-library.git`
38-
>- `git remote -v`
37+
- `git remote add upstream https://github.com/linkedin/data-integration-library.git`
38+
- `git remote -v`
3939
- Change, test, commit, and push to your fork
40-
>- `git status`
41-
>- `git add .`
42-
>- `git commit -m "comments"`
43-
>- `git push origin master`
40+
- `git status`
41+
- `git add .`
42+
- `git commit -m "comments"`
43+
- `git push origin master`
4444
- Create Pull Request on GitHub with the following details
45-
>- Title
46-
>- Detailed description
47-
>- Document the tests done
48-
>- Links to the updated documents
45+
- Title
46+
- Detailed description
47+
- Document the tests done
48+
- Links to the updated documents
49+
- Publish to local Maven repository
50+
- `./gradlew publishToMavenLocal`
4951

5052
# Detailed Documents
5153

52-
[Deprecated Job Properties](https://github.com/linkedin/data-integration-library/blob/master/docs/parameters/deprecated.md)
54+
- [Job Properties](https://github.com/linkedin/data-integration-library/blob/master/docs/parameters/summary.md)
55+
- [Job Properties by Category](https://github.com/linkedin/data-integration-library/blob/master/docs/parameters/categories.md)
56+
- [Deprecated Job Properties](https://github.com/linkedin/data-integration-library/blob/master/docs/parameters/deprecated.md)

build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ allprojects {
4444

4545
subprojects {
4646
dependencies {
47-
// Gradle 5 compatibility
48-
compileOnly externalDependency.lombok
49-
testCompileOnly externalDependency.lombok
50-
annotationProcessor externalDependency.lombok
51-
testAnnotationProcessor externalDependency.lombok
5247
}
5348
project.buildDir = new File(project.rootProject.buildDir, project.name)
5449
}

cdi-core/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ dependencies {
3131
compile externalDependency.'awsUtils'
3232
compile externalDependency.'commonsValidator'
3333
compile externalDependency.'guava'
34-
compile externalDependency.'lombok'
3534
compile externalDependency.'commonsLang3'
3635
compile externalDependency.'testng'
3736
compile externalDependency.'jhyde'

cdi-core/src/main/java/com/linkedin/cdi/configuration/MultistageProperties.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import com.google.gson.JsonArray;
99
import com.google.gson.JsonObject;
1010
import com.linkedin.cdi.factory.DefaultConnectionClientFactory;
11-
import lombok.Getter;
12-
import lombok.extern.slf4j.Slf4j;
1311
import org.apache.commons.lang.StringUtils;
1412
import org.apache.gobblin.configuration.State;
13+
import org.slf4j.Logger;
14+
import org.slf4j.LoggerFactory;
1515

1616

1717
/**
@@ -37,8 +37,6 @@
3737
*
3838
* @author chrli
3939
*/
40-
@Slf4j
41-
@Getter
4240
@SuppressWarnings("unchecked")
4341
public enum MultistageProperties {
4442
/**
@@ -865,13 +863,22 @@ public <T> T getDefaultValue() {
865863
},
866864
DATA_PUBLISHER_FINAL_DIR("data.publisher.final.dir", String.class);
867865

866+
private static final Logger LOG = LoggerFactory.getLogger(MultistageProperties.class);
868867
final static private Gson GSON = new Gson();
869868
final static private String PROPERTY_SEPARATOR = ".";
870869

871870
private final String config;
872871
private final Class<?> className;
873872
private final Object defaultValue;
874873

874+
public String getConfig() {
875+
return config;
876+
}
877+
878+
public Class<?> getClassName() {
879+
return className;
880+
}
881+
875882
MultistageProperties(String config, Class<?> className) {
876883
this.config = config;
877884
this.className = className;

cdi-core/src/main/java/com/linkedin/cdi/connection/HdfsConnection.java

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@
77
import com.google.common.annotations.VisibleForTesting;
88
import com.google.common.base.Preconditions;
99
import com.google.common.collect.Lists;
10-
import java.io.InputStream;
11-
import java.net.URI;
12-
import java.util.List;
13-
import java.util.stream.Collectors;
14-
import lombok.AccessLevel;
15-
import lombok.Getter;
16-
import lombok.Setter;
17-
import lombok.extern.slf4j.Slf4j;
18-
import org.apache.gobblin.configuration.State;
1910
import com.linkedin.cdi.exception.RetriableAuthenticationException;
2011
import com.linkedin.cdi.keys.ExtractorKeys;
2112
import com.linkedin.cdi.keys.HdfsKeys;
2213
import com.linkedin.cdi.keys.JobKeys;
2314
import com.linkedin.cdi.util.InputStreamUtils;
2415
import com.linkedin.cdi.util.WorkUnitStatus;
16+
import java.io.InputStream;
17+
import java.net.URI;
18+
import java.util.List;
19+
import java.util.stream.Collectors;
20+
import org.apache.gobblin.configuration.State;
2521
import org.apache.gobblin.source.extractor.filebased.FileBasedHelperException;
2622
import org.apache.gobblin.source.extractor.filebased.TimestampAwareFileBasedHelper;
2723
import org.apache.gobblin.source.extractor.hadoop.HadoopFsHelper;
24+
import org.slf4j.Logger;
25+
import org.slf4j.LoggerFactory;
2826

2927

3028
/**
@@ -33,12 +31,23 @@
3331
*
3432
* @author Chris Li
3533
*/
36-
@Slf4j
3734
public class HdfsConnection extends MultistageConnection {
35+
private static final Logger LOG = LoggerFactory.getLogger(HdfsConnection.class);
36+
37+
public HdfsKeys getHdfsKeys() {
38+
return hdfsKeys;
39+
}
40+
41+
public TimestampAwareFileBasedHelper getFsHelper() {
42+
return fsHelper;
43+
}
44+
45+
public void setFsHelper(TimestampAwareFileBasedHelper fsHelper) {
46+
this.fsHelper = fsHelper;
47+
}
48+
3849
private final static String URI_REGEXP_PATTERN = "RE=";
39-
@Getter
4050
final private HdfsKeys hdfsKeys;
41-
@Setter (AccessLevel.PACKAGE)
4251
private TimestampAwareFileBasedHelper fsHelper;
4352

4453
public HdfsConnection(State state, JobKeys jobKeys, ExtractorKeys extractorKeys) {
@@ -99,7 +108,7 @@ public boolean closeAll(String message) {
99108
fsHelper = null;
100109
return true;
101110
} catch (Exception e) {
102-
log.error("Error closing file system connection", e);
111+
LOG.error("Error closing file system connection", e);
103112
return false;
104113
}
105114
}
@@ -132,7 +141,7 @@ private List<String> readFileList(final String path, final String pattern) {
132141
.filter(fileName -> fileName.matches(pattern))
133142
.collect(Collectors.toList());
134143
} catch (FileBasedHelperException e) {
135-
log.error("Not able to run ls command due to " + e.getMessage(), e);
144+
LOG.error("Not able to run ls command due to " + e.getMessage(), e);
136145
}
137146
return Lists.newArrayList();
138147
}
@@ -143,11 +152,11 @@ private List<String> readFileList(final String path, final String pattern) {
143152
* @return the file content in an InputStream
144153
*/
145154
private InputStream readSingleFile(final String path) {
146-
log.info("Processing file: {}", path);
155+
LOG.info("Processing file: {}", path);
147156
try {
148157
return fsHelper.getFileStream(path);
149158
} catch (FileBasedHelperException e) {
150-
log.error("Not able to run getFileStream command due to " + e.getMessage(), e);
159+
LOG.error("Not able to run getFileStream command due to " + e.getMessage(), e);
151160
return null;
152161
}
153162
}
@@ -159,7 +168,7 @@ TimestampAwareFileBasedHelper getHdfsClient() {
159168
fsHelper.connect();
160169
return fsHelper;
161170
} catch (Exception e) {
162-
log.error("Failed to initialize HdfsSource", e);
171+
LOG.error("Failed to initialize HdfsSource", e);
163172
return null;
164173
}
165174
}

0 commit comments

Comments
 (0)