Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,7 @@ private LinkedList<POStore> processStores(TezOperator tezOp,
ArrayList<POStore> storeLocations = new ArrayList<POStore>();
for (POStore st : stores) {
storeLocations.add(st);
StoreFuncInterface sFunc = st.getStoreFunc();
sFunc.setStoreLocation(st.getSFile().getFileName(), job);
sFunc.addCredentials(job.getCredentials(), job.getConfiguration());
addCredentials(job, st);
}

Path tmpLocation = null;
Expand Down Expand Up @@ -1135,6 +1133,19 @@ private LinkedList<POStore> processStores(TezOperator tezOp,
return stores;
}

private static void addCredentials(Job job, POStore st) throws IOException {
StoreFuncInterface sFunc = st.getStoreFunc();
sFunc.addCredentials(job.getCredentials(), job.getConfiguration());

// Backward compatibility - before addCredentials API was introduced, credentials were set in setStoreLocation method
Job storeJob = new Job(job.getConfiguration());
sFunc.setStoreLocation(st.getSFile().getFileName(), storeJob);
// Should always be the same object - Just future proofing
if (job.getCredentials() != storeJob.getCredentials()) {
job.getCredentials().mergeAll(storeJob.getCredentials());
}
}

@SuppressWarnings("rawtypes")
private void setIntermediateOutputKeyValue(byte keyType, Configuration conf, TezOperator tezOp,
boolean isConnectedToPackage, boolean isMergedInput) throws JobCreationException, ExecException {
Expand Down