Skip to content

only check for delegation token from NN when it is non S3 filesystem - #50

Draft
johnnysohn wants to merge 51 commits into
hubspot-3.3.6from
js_s3_no_kerberos
Draft

only check for delegation token from NN when it is non S3 filesystem#50
johnnysohn wants to merge 51 commits into
hubspot-3.3.6from
js_s3_no_kerberos

Conversation

@johnnysohn

@johnnysohn johnnysohn commented Apr 18, 2024

Copy link
Copy Markdown

Description of PR

We have an issue where writing to S3 fails because we're checking delegation token before writing in FileOutputFormat. Normally call to TokenCache.obtainTokensForNamenodes shouldn't fail in this case of writing to S3 because it returns if security isn't enabled, but we have jobs that can do lots of things and within it also makes calls to HBase to authenticate and thus creates problem for FileOutputFormat writing to S3.

java.lang.RuntimeException: Failed to write HFiles
	at com.hubspot.spark.utils.bulk.loading.SparkBulkLoadRunner.writeBulkLoadHFilesInternal(SparkBulkLoadRunner.java:394)
	at com.hubspot.spark.utils.bulk.loading.SparkBulkLoadRunner.writeBulkLoadHFiles(SparkBulkLoadRunner.java:353)
	at com.hubspot.spark.utils.bulk.loading.SparkBulkLoadRunner.writeBulkLoadHFiles(SparkBulkLoadRunner.java:308)
	at com.hubspot.spark.utils.bulk.loading.SparkBulkLoadRunner.runBulkLoadAsync(SparkBulkLoadRunner.java:242)
	at com.hubspot.unified.events.spark.client.harddelete.HBaseAsyncBulkLoadHardDeleteManager.lambda$getRetryableBulkLoadFuture$8(HBaseAsyncBulkLoadHardDeleteManager.java:306)
	at com.hubspot.futures.retryer.AsyncRetryer$AsyncTask.callOnce(AsyncRetryer.java:191)
	at com.hubspot.futures.retryer.AsyncRetryer$AsyncTask.initiateSingleRun(AsyncRetryer.java:110)
	at com.hubspot.futures.retryer.AsyncRetryer$AsyncTask.lambda$scheduleAnotherRun$1(AsyncRetryer.java:159)
	at com.hubspot.hwt.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:686)
	at com.hubspot.hwt.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:755)
	at com.hubspot.hwt.HashedWheelTimer$Worker.run(HashedWheelTimer.java:498)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Can't get Master Kerberos principal for use as renewer
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:134)
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:102)
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodes(TokenCache.java:81)
	at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:160)
	at org.apache.spark.internal.io.HadoopMapReduceWriteConfigUtil.assertConf(SparkHadoopWriter.scala:403)
	at org.apache.spark.internal.io.SparkHadoopWriter$.write(SparkHadoopWriter.scala:71)
	at org.apache.spark.rdd.PairRDDFunctions.$anonfun$saveAsNewAPIHadoopDataset$1(PairRDDFunctions.scala:1078)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
	at org.apache.spark.rdd.RDD.withScope(RDD.scala:406)
	at org.apache.spark.rdd.PairRDDFunctions.saveAsNewAPIHadoopDataset(PairRDDFunctions.scala:1076)
	at org.apache.spark.rdd.PairRDDFunctions.$anonfun$saveAsNewAPIHadoopFile$2(PairRDDFunctions.scala:995)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
	at org.apache.spark.rdd.RDD.withScope(RDD.scala:406)
	at org.apache.spark.rdd.PairRDDFunctions.saveAsNewAPIHadoopFile(PairRDDFunctions.scala:986)
	at org.apache.spark.api.java.JavaPairRDD.saveAsNewAPIHadoopFile(JavaPairRDD.scala:825)
	at com.hubspot.spark.utils.bulk.loading.SparkBulkLoadRunner.writeBulkLoadHFilesInternal(SparkBulkLoadRunner.java:386)

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

bbeaudreault and others added 30 commits July 18, 2023 16:33
* Build Hadoop for arm64

* Rely on buildpack for docker usage

* Use Java 11

* try without maven cache

* Compute env vars inside build.sh

* use buildpack maven support

* back to master dependencies

Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
)

Co-authored-by: Charles Connell <cconnell@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
…fallback (#26)

Co-authored-by: Charles Connell <cconnell@hubspot.com>
Hadoop release process involves creating a new branch for every release, so
we can't easily follow the expected process of having a branch per major release.
Instead we need to have a branch per release as well, and cherry-pick our changes
over to each new release. Update our build script and rpm spec to account.
Co-authored-by: Charles Connell <cconnell@hubspot.com>
* Update .blazar.yaml

* Update .blazar.yaml

* Update .blazar.yaml

* Update .blazar.yaml
- Update build versioning to be based around patch versions
- Use single-module builds to ease dependency graph issues
- Force HBase1 building to work around activeByDefault behavior
…ble with node.js 12 to avoid compilation error. (apache#5827). Contributed by Masatake Iwasaki

Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
(cherry picked from commit a822a3c)
#32)

* SaslPropertiesResolver should not allow mutation of its internal state

* Keep SASL properties map sorted

---------

Co-authored-by: Charles Connell <cconnell@hubspot.com>
(cherry picked from commit 6761522)
* Persist build env variables withour build rc file

* Add clarifying comment

* Cleanup HADOOP_VERSION environment variable

* Copy changes to all blazar yaml files

* Revert "Copy changes to all blazar yaml files"

This reverts commit 5f4457e.

---------

Co-authored-by: Samuel McCann <smccann@hubspot.com>
bbeaudreault and others added 21 commits November 28, 2023 20:54
…y max-streams-hard-limit configuration (apache#5143)

Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…freshable (apache#4567)

Reviewed-by: Hiroyuki Adachi <hadachi@yahoo-corp.jp>
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…plicatedTasks and numReplicationTasks during block recovery (apache#6348)

Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
…native codec. (apache#5520). Contributed by WangYuanben.

Reviewed-by: Tao Li <tomscut@apache.org>
Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
* Remove deployAtEnd because it disables publishing

* Increase build timeout for Hadoop

---------

Co-authored-by: Derik DeLong <ddelong@hubspot.com>
…ddTransferRateMetric(). (apache#6290). Contributed by Xing Lin.

Reviewed-by: Ravindra Dingankar <rdingankar@linkedin.com>
Reviewed-by: Simbarashe Dzinamarira <sdzinamarira@linkedin.com>
Reviewed-by: Tao Li <tomscut@apache.org>
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
- Change build order to avoid deploy plugin defect
- Remove build exclusion
- Restore original location for argument, remove weird skip config
- Move the deployAtEnd to a different spot
- Leave config in same place
- Disable deployAtEnd
- Increase build timeout for Hadoop
* Use new rpm buildpack

* Update .blazar.yaml

---------

Co-authored-by: Scott Williams <srwilliams@hubspot.com>
Co-authored-by: Charles Connell <cconnell@hubspot.com>
@charlesconnell
charlesconnell force-pushed the hubspot-3.3.6 branch 2 times, most recently from 0057a70 to c1f38bb Compare July 29, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.