Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOBBLIN-849] Connect to Oracle using service name, update metadata query #2705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssnarvekar01
Copy link

@ssnarvekar01 ssnarvekar01 commented Aug 9, 2019

…data query for OracleExtractor

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    Improvement: Enable connection to oracle using service name
    Bug Fix: Update metadata fetch query in OracleExtractor which was failing when we provide owner and table_name in lower case through job config file.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@codecov-io
Copy link

Codecov Report

Merging #2705 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2705      +/-   ##
============================================
- Coverage      44.9%   44.88%   -0.02%     
+ Complexity     8713     8709       -4     
============================================
  Files          1879     1879              
  Lines         70079    70083       +4     
  Branches       7703     7706       +3     
============================================
- Hits          31466    31454      -12     
- Misses        35702    35719      +17     
+ Partials       2911     2910       -1
Impacted Files Coverage Δ Complexity Δ
...pache/gobblin/configuration/ConfigurationKeys.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...rg/apache/gobblin/source/jdbc/OracleExtractor.java 43.83% <0%> (-1.24%) 7 <0> (ø)
...bblin/cluster/GobblinHelixJobLauncherListener.java 70% <0%> (-30%) 3% <0%> (-2%)
...lin/util/filesystem/FileSystemInstrumentation.java 85.71% <0%> (-7.15%) 3% <0%> (ø)
.../gobblin/cluster/HelixRetriggeringJobCallable.java 60.41% <0%> (-3.48%) 9% <0%> (ø)
...ache/gobblin/couchbase/writer/CouchbaseWriter.java 66.27% <0%> (-2.33%) 11% <0%> (ø)
...pache/gobblin/cluster/GobblinHelixJobLauncher.java 81.25% <0%> (-2.09%) 26% <0%> (-2%)
...ache/gobblin/cluster/GobblinHelixJobScheduler.java 39.21% <0%> (-1.31%) 6% <0%> (ø)
...in/java/org/apache/gobblin/cluster/HelixUtils.java 41.83% <0%> (ø) 13% <0%> (-1%) ⬇️
.../org/apache/gobblin/cluster/GobblinTaskRunner.java 66.19% <0%> (+0.46%) 29% <0%> (ø) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8903ebf...486307c. Read the comment docs.

@jhsenjaliya
Copy link
Contributor

+1, LGTM

@ssnarvekar01 ssnarvekar01 changed the title [GOBBLIN-849] Connection to Oracle using service name and update meta… [GOBBLIN-849] Connect to Oracle using service name, update metadata query Aug 15, 2019
String sid = this.workUnitState.contains(ConfigurationKeys.SOURCE_CONN_SID) ? this.workUnitState.getProp(ConfigurationKeys.SOURCE_CONN_SID).trim() : "";
String serviceName = this.workUnitState.contains(ConfigurationKeys.SOURCE_CONN_SERVICE_NAME) ? this.workUnitState.getProp(ConfigurationKeys.SOURCE_CONN_SERVICE_NAME).trim() : "";
String conn;
if(sid != null && sid.length() > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with if (!Strings.isNullOrEmpty(sid)) ?

String serviceName = this.workUnitState.contains(ConfigurationKeys.SOURCE_CONN_SERVICE_NAME) ? this.workUnitState.getProp(ConfigurationKeys.SOURCE_CONN_SERVICE_NAME).trim() : "";
String conn;
if(sid != null && sid.length() > 0)
conn = ":" + sid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "conn" with "serviceString" or something more meaningful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants