-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add HBase SDK for serving #127
Conversation
796fa72
to
b8461e8
Compare
4dc8df6
to
fd81384
Compare
fd81384
to
fd4470c
Compare
Use of deprecated classes result in ImmutableHTableDescriptor returned which throws java.lang.UnsupportedOperationException: HTableDescriptor is read-only error
* Use offset and length to get rowCell values because hbase server returns slightly different response structure than bigtable * This is also applied when looking up the avro schema
* Use offset and length to get rowCell values because hbase server returns slightly different response structure than bigtable * This is also applied when looking up the avro schema
[feat] Add support to use hbase online store
can you update the PR description and highlight what are the primary changes? |
|
||
@Bean | ||
public OnlineRetriever getRetriever() { | ||
// Using HBase SDK | ||
if (isUsingHBaseSDK) { | ||
org.apache.hadoop.conf.Configuration config = |
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.
should this block wrapped by try catch
block? I saw that the connect method can throw the IllegalStateException
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.
@bayu-aditya could you take a look at this?
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.
Yup sure
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.
Done in here 455e253 Thank you for your finding
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.
should we use one try catch and condition is in the try catch block?
caraml-store-serving/src/main/java/dev/caraml/serving/store/bigtable/HBaseOnlineRetriever.java
Outdated
Show resolved
Hide resolved
@Override | ||
public int hashCode() { | ||
int result = tableName.hashCode(); | ||
result = 31 * result + schemaHash.hashCode(); |
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.
what is 31 represent for?
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 have no idea 😆
caraml-store-serving/src/main/java/dev/caraml/serving/store/bigtable/HBaseSchemaRegistry.java
Outdated
Show resolved
Hide resolved
caraml-store-spark/src/main/scala/dev/caraml/spark/stores/bigtable/HbaseSinkRelation.scala
Outdated
Show resolved
Hide resolved
@tiopramayudi @mbruner poke |
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.
Add two more feedbacks, the rest is LGTM. Thanks @bayu-aditya @shydefoo
return Collections.<Feature>emptyList(); | ||
} else { | ||
Result row = rows.get(rowKey); | ||
return featureReferences.stream() |
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.
the chain is very long, is it possible to break the chain?
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.
done in 4355a1a thank you 🙏
|
||
@Bean | ||
public OnlineRetriever getRetriever() { | ||
// Using HBase SDK | ||
if (isUsingHBaseSDK) { | ||
org.apache.hadoop.conf.Configuration config = |
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.
should we use one try catch and condition is in the try catch block?
Summary
This PR adds support to use hbase as the online store.
caraml.store.bigtable.isUsingHBaseSDK
becometrue
. If the value isfalse
, then it will read data by using BigTable SDK.