Skip to content

Commit

Permalink
Added comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRahulSharma committed Nov 24, 2023
1 parent 7dd7b1f commit f1926fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public List<InputSplit> getSplits(JobContext jobContext) {
return getSplits(jobContext.getConfiguration());
}

/**
* Get the split details based on the given Configuration.
*
* @param configuration Hadoop's configuration object
* @return List of InputSplits based on the tableInfo details from the Configuration object.
*/
public List<InputSplit> getSplits(Configuration configuration) {
ServiceNowJobConfiguration jobConfig = new ServiceNowJobConfiguration(configuration);
int pageSize = jobConfig.getPluginConf().getPageSize().intValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public void initialize(InputSplit split, TaskAttemptContext context) {
fetchSchema(restApi);
}

/**
* Initialize with only the provided split.
* This method should not be called directly from the code,
* as Hadoop runtime initialize internally during execution.
*
* @param split Split to read by the current reader.
*/
public void initialize(InputSplit split) {
initialize(split, null);
}
Expand Down

0 comments on commit f1926fc

Please sign in to comment.