Uploaded image for project: 'Apache Gobblin'
  1. Apache Gobblin
  2. GOBBLIN-105

State management changes to TaskState, DatasetSate and JobState broke arbitrary number of implementations of Source and Extractors

    XMLWordPrintableJSON

Details

    Description

      The changes to state management induced with this PR: https://github.com/linkedin/gobblin/pull/932 broke a few Source / Extractors.

      The job specific properties being read from WorkUnitState are not available in it anymore, and are now to be read from JobState; whereas any previous code references / implementation assumed that all were available via WorkUnitState

      If you face this issue, use this workaround (instead of reading property directly from WorkUnitState, use this):

      ```
      // If WorkUnitState does not contains a property, it should be attempted to be fetched from JobState
      private String readProp(String key, WorkUnitState workUnitState) {
      String value = workUnitState.getWorkunit().getProp(key);
      if (StringUtils.isBlank(value))

      { value = workUnitState.getJobState().getProp(key); }

      return value;
      }
      ```

      Github Url : https://github.com/linkedin/gobblin/issues/1022
      Github Reporter : abti
      Github Assignee : abti
      Github Created At : 2016-06-01T19:25:26Z
      Github Updated At : 2017-01-12T05:06:00Z

      Comments


      stakiar wrote on 2016-07-02T17:20:38Z : @abti is this related to https://github.com/linkedin/gobblin/issues/1065? If this is breaking all the JDBC extractors we probably need to fix this ASAP.

      Github Url : https://github.com/linkedin/gobblin/issues/1022#issuecomment-230112626


      abti wrote on 2016-07-06T20:20:57Z : @sahilTakiar yes this seems related

      Github Url : https://github.com/linkedin/gobblin/issues/1022#issuecomment-230894149

      Attachments

        Activity

          People

            hutran Hung Tran
            abti Abhishek Tiwari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: