Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

[PIO-61] Add S3 Model Data Repository #371

Closed
wants to merge 2 commits into from

Conversation

marevol
Copy link
Member

@marevol marevol commented Apr 18, 2017

No description provided.

assemblyShadeRules in assembly := Seq(
ShadeRule.rename("org.apache.http.**" -> "shadeio.data.s3.http.@1").inAll,
ShadeRule.rename("com.fasterxml.**" -> "shadeio.data.s3.fasterxml.@1").inAll
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @marevol can you explain a little bit regarding these shade rules, please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aws-java-sdk-s3 depends on them, but they conflict with different version files in spark-assembly jar.
To avoid this conflict, the package replacement is needed in storage/s3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mars could you provide info?
ES storage also conflicts with httpclient jar file of Spark.
I think an exception occurs if removing it, so it will be needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marevol,

We're building a predictionio-incubating branch to add authentication to the Elasticsearch REST client with Scala 2.11 & Spark 2.1.

I believe it was during a runtime ES REST client call to performRequest suddenly an underlying method signature could not be located in org.apache.http package. @dszeto helped me to discover that the shadeio.data name was being incorrectly resolved. So, I tried removing the shade rule and it started working. No more errors for that branch.

Maybe the difference is that we're using Spark 2.1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the info.
My environment is Scala 2.10 and Spark 1.6.3.
I'll check it on Spark 2.1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking on Scala 2.11/Spark 2.1/ES 5.1&5.3, I could not reproduce it yet...
My test script file is test_all.sh to build pio and run recommender template.
Is it reproduced in Docker tests? I'd like to know steps to reproduce it...

@dszeto
Copy link
Contributor

dszeto commented May 3, 2017

@marevol Would you like to add some integration test for this? https://github.com/jubos/fake-s3 or https://github.com/atlassian/localstack might be useful for mocking S3 locally within Travis.

@marevol
Copy link
Member Author

marevol commented May 24, 2017

Added LocalStack for S3 testing.
LocalStack/moto seems to have a problem about ETag handling...
I added DISABLE_CHUNKED_ENCODING option to avoid it in S3 testing.

@marevol
Copy link
Member Author

marevol commented Jun 5, 2017

I would like to merge S3 support this week.
For travis testing, it passed in https://travis-ci.org/jpioug/incubator-predictionio/builds/235569236 though apache-travis was failed...
Please let me know if you have any comments/concerns.

@dszeto
Copy link
Contributor

dszeto commented Jun 5, 2017

Sorry for the delay. I was on vacation.

This looks great to me, especially the use of localstack. I think the Travis failed downloading a Python library and erred out. It shouldn't matter IMO. I'll merge this now.

@asfgit asfgit closed this in 3330013 Jun 5, 2017
@marevol marevol deleted the storage_s3 branch October 15, 2018 00:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants