-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-28965: tez.DagUtils: Failed to add credential supplier, ClassNotFoundException: org.apache.hadoop.hive.kafka.KafkaDagCredentialSupplier #6081
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
base: master
Are you sure you want to change the base?
Conversation
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (6)calcualtion Previously acknowledged words that are now absentwwwTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:KiranVelumuri/hive.git repository
If the flagged items do not appear to be textIf items relate to a ...
|
dagSuppliers.add(c.getConstructor().newInstance()); | ||
} catch (ReflectiveOperationException e) { | ||
LOG.error("Failed to add credential supplier", e); | ||
LOG.warn("Failed to add credential supplier: {}", s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's ok, but would be great to init those CredentialSuppliers only when used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, would look into this.
8a6b65b
to
9e2a37b
Compare
9e2a37b
to
7daf17b
Compare
@deniskuzZ We needed some check at DagUtils to add the kafka credential supplier only when needed. So I referred to obtainToken and added those checks(isTokenRequired) here. Could you please tell if this approach is ok here? |
* @param props the properties from which to obtain the protocol. | ||
* @return the security protocol if one is defined in the properties and null otherwise. | ||
*/ | ||
static SecurityProtocol getSecurityProtocol(Properties props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this functionality should be extracted to util class like KafkaUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was from KafkaUtils, I put it here to avoid dependency on kafka-handler(since it causes cyclic dependency)
in my opinion it's a bit of overkill. We shouldn't copy code from kafka-handler, instead we might initialize suppliers lazily only when UserGroupInformation.isSecurityEnabled
Note, this is only a test classpath issue, in production deployment kafka-handler jar would be always present. |
yes @deniskuzZ. This is what I felt too and wanted your opinion on. |
the original goal was to completely remove kafka dependency from ql, which is the case for every other third party that hive provides a storage handler for, so we should maintain that behavior |
i've updated the snippet, @KiranVelumuri please take a look #6081 (comment) |
…FoundException: org.apache.hadoop.hive.kafka.KafkaDagCredentialSupplier
7daf17b
to
8ac92cf
Compare
|
@deniskuzZ Thank you for the snippet. Could you please review? Sorry I was away travelling for the past 3 days. |
What changes were proposed in this pull request?
Warn instead of throw error in logs when KafkaDagCredentialSupplier is not available in classpath
Why are the changes needed?
Stacktrace for ClassNotFoundException for KafkaDagCredentialSupplier is printed for cases not relevant to current scenario(might not be Kafka related or need a credential supplier)
Does this PR introduce any user-facing change?
No
How was this patch tested?
mvn test -Dtest=TestBeeLineWithArgs#testRowsAffected