Skip to content
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

Fix HBase init error when Kerberos is enabled #1294

Merged
merged 3 commits into from
Dec 14, 2020

Conversation

tmljob
Copy link
Contributor

@tmljob tmljob commented Dec 10, 2020

This PR fix 2 errors when Kerberos is enabled,as follws:
1、The script init-store.sh excludes /jre/lib/ext path;
2、The hbase-site.xml can‘t be readed when HBase create configuration.

zhoney and others added 2 commits December 10, 2020 09:18
* set indexlabel invalid if create or rebuild failed
* also check if indexlabel invalid when query by index
* set vl/el to UNDELETED if fail to delete

Change-Id: If890b3bd8c441b63642a2006479cf4ccca9ddf67
hugegraph-dist/src/assembly/static/bin/init-store.sh Outdated Show resolved Hide resolved
@@ -135,6 +136,9 @@ public synchronized void open() throws IOException {
hConfig.setInt("hbase.hconnection.threads.max",
config.get(HbaseOptions.HBASE_THREADS_MAX));

String hbaseSite = config.get(HbaseOptions.HBASE_HBASE_SITE);
Copy link
Contributor

Choose a reason for hiding this comment

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

can it be null? don't addResource if hbaseSite is null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This config item's default value is /etc/hbase/conf/hbase-site.xml.If not setting,program will get default value.

Copy link
Contributor

Choose a reason for hiding this comment

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

what happens if there not exist file "/etc/hbase/conf/hbase-site.xml"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The program runs normally.If not modified,program read the file from hbase-common-2.0.6.jar, it does not exist actually but prograpm runs normally.

  public static Configuration addHbaseResources(Configuration conf) {
    conf.addResource("hbase-default.xml");
    conf.addResource("hbase-site.xml");

    checkDefaultsVersion(conf);
    return conf;
  }

@javeme
Copy link
Contributor

javeme commented Dec 10, 2020

please rebase master: rebase -i master and remove 6701022 and 45cf281 commits

@codecov
Copy link

codecov bot commented Dec 10, 2020

Codecov Report

Merging #1294 (51d2a6a) into master (f6f44bb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1294   +/-   ##
=========================================
  Coverage     62.09%   62.10%           
- Complexity     5767     5768    +1     
=========================================
  Files           377      377           
  Lines         31493    31496    +3     
  Branches       4413     4413           
=========================================
+ Hits          19556    19560    +4     
  Misses         9946     9946           
+ Partials       1991     1990    -1     
Impacted Files Coverage Δ Complexity Δ
...du/hugegraph/backend/tx/GraphIndexTransaction.java 81.32% <ø> (ø) 203.00 <0.00> (ø)
...du/hugegraph/backend/store/hbase/HbaseOptions.java 96.66% <100.00%> (+0.11%) 2.00 <0.00> (ø)
...u/hugegraph/backend/store/hbase/HbaseSessions.java 58.72% <100.00%> (+0.24%) 21.00 <0.00> (ø)
...va/com/baidu/hugegraph/task/ServerInfoManager.java 70.78% <0.00%> (+0.56%) 51.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6f44bb...54a58f3. Read the comment docs.

@tmljob tmljob force-pushed the fix-kerberos branch 2 times, most recently from 777f60d to 51d2a6a Compare December 10, 2020 06:04
@tmljob tmljob requested a review from javeme December 10, 2020 06:07
@tmljob
Copy link
Contributor Author

tmljob commented Dec 10, 2020

45cf281

How to rebase and remove? I execute "git rebase -i master" in brach fix-kerberos. It report displays the following output,and then what to do?

pick 51d2a6ae Fix bug: hbase init error when kerberos is enabled fix #1292

# Rebase 45cf281e..51d2a6ae onto 45cf281e (1 command)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#

@tmljob
Copy link
Contributor Author

tmljob commented Dec 10, 2020

please rebase master: rebase -i master and remove 6701022 and 45cf281 commits

我通过 git rebase --onto 6701022^ 6701022 来删除这个提交,然后强制push,感觉搞乱掉了呀。

Git彻底删除一次提交

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

just rebase -i master and pick one commit

@@ -135,6 +136,9 @@ public synchronized void open() throws IOException {
hConfig.setInt("hbase.hconnection.threads.max",
config.get(HbaseOptions.HBASE_THREADS_MAX));

String hbaseSite = config.get(HbaseOptions.HBASE_HBASE_SITE);
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens if there not exist file "/etc/hbase/conf/hbase-site.xml"

@zhoney zhoney merged commit f0d1146 into apache:master Dec 14, 2020
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.

4 participants