You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2011/09/12 15:19:09 UTC
[jira] [Created] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
HBaseAdmin.assign() doesnot use force flag
------------------------------------------
Key: HBASE-4373
URL: https://issues.apache.org/jira/browse/HBASE-4373
Project: HBase
Issue Type: Improvement
Reporter: ramkrishna.s.vasudevan
Assignee: ramkrishna.s.vasudevan
Priority: Minor
The HBaseAdmin.assign()
{code}
public void assign(final byte [] regionName, final boolean force)
throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
getMaster().assign(regionName, force);
}
{code}
In the HMaster we call
{code}
Pair<HRegionInfo, ServerName> pair =
MetaReader.getRegion(this.catalogTracker, regionName);
if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
if (cpHost != null) {
if (cpHost.preAssign(pair.getFirst(), force)) {
return;
}
}
assignRegion(pair.getFirst());
if (cpHost != null) {
cpHost.postAssign(pair.getFirst(), force);
}
{code}
The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106057#comment-13106057 ]
Ted Yu commented on HBASE-4373:
-------------------------------
+1 on latest patch.
It looks much cleaner.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-4373:
--------------------------
Summary: HBaseAdmin.assign() does not use force flag (was: HBaseAdmin.assign() doesnot use force flag)
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "Gary Helmling (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106632#comment-13106632 ]
Gary Helmling commented on HBASE-4373:
--------------------------------------
+1 on the latest patch.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Status: Patch Available (was: Open)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Status: Open (was: Patch Available)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106793#comment-13106793 ]
Hudson commented on HBASE-4373:
-------------------------------
Integrated in HBase-TRUNK #2221 (See [https://builds.apache.org/job/HBase-TRUNK/2221/])
HBASE-4373 HBaseAdmin.assign() does not use force flag (Ramkrishna)
tedyu :
Files :
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterObserver.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
* /hbase/trunk/src/main/ruby/hbase/admin.rb
* /hbase/trunk/src/main/ruby/shell/commands/assign.rb
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106642#comment-13106642 ]
Ted Yu commented on HBASE-4373:
-------------------------------
Integrated to TRUNK.
Thanks for the patch Ramkrishna.
Thanks for the review, Gary.
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106767#comment-13106767 ]
stack commented on HBASE-4373:
------------------------------
@Jon This patch doesn't change behavior. It just clears away a method that took a force flag that was being ignored.
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Attachment: HBASE-4373.patch
@Stack
I have deprecated the existing assign api and added a new api without force fla.
Update in ruby file also.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Status: Patch Available (was: Open)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Status: Patch Available (was: Open)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103804#comment-13103804 ]
stack commented on HBASE-4373:
------------------------------
@Ram OK. Going by your rationale above, we should deprecate the override that has the force flag.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-4373:
-------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
Committed by Ted today.
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Status: Open (was: Patch Available)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103425#comment-13103425 ]
ramkrishna.s.vasudevan commented on HBASE-4373:
-----------------------------------------------
@Stack
But except in AssignmentManager.handleHBCK(RegionTransitionData data)
for the M_ZK_REGION_OFFLINE case we use
assign(regionInfo, false); with force=false. All other places force=true.
And also when you take the HBaseAdmin.assign() api then allowing the user to use force=false will not yield him the result as he may not be aware in what state the znode is currently in. So i felt like removing the parameter.
Pls provide your suggestions.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Attachment: HBASE-4373_1.patch
addressing Gary's comments.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "Gary Helmling (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105904#comment-13105904 ]
Gary Helmling commented on HBASE-4373:
--------------------------------------
Ram,
For MasterObserver, BaseMasterObserver, TestMasterObserver, I'd say there's no need to deprecate the existing verison of the methods. Coprocessors have not been released yet, so those classes don't represent an API we have to maintain yet. You can just remove the flag.
Otherwise the patch looks good to me.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Attachment: HBASE-4373_1.patch
Rebased the patch with Ted's comments.
Deprecated all the implemented apis.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105587#comment-13105587 ]
Ted Yu commented on HBASE-4373:
-------------------------------
In BaseMasterObserver.java:
{code}
+ @Override
+ public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
HRegionInfo regionInfo, boolean force) throws IOException {
{code}
Please add @Deprecated for the above and the old postAssign().
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-4373:
--------------------------
Fix Version/s: 0.92.0
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4373) HBaseAdmin.assign() doesnot use force
flag
Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4373:
------------------------------------------
Attachment: (was: HBASE-4373_1.patch)
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105880#comment-13105880 ]
Ted Yu commented on HBASE-4373:
-------------------------------
New patch looks good.
Minor comment: wrap long lines such as the following:
{code}
+ * @deprecated The <code>force</code> is unused.Use {@link #postAssign(ObserverContext, HRegionInfo)}
{code}
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() does not use
force flag
Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106760#comment-13106760 ]
Jonathan Gray commented on HBASE-4373:
--------------------------------------
Trying to understand this patch. So with the force flag removed, what is the default behavior? If the state is not OFFLINE and we try to assign somewhere else, do we force the node to OFFLINE always?
> HBaseAdmin.assign() does not use force flag
> -------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4373.patch, HBASE-4373_1.patch
>
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4373) HBaseAdmin.assign() doesnot use
force flag
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102906#comment-13102906 ]
stack commented on HBASE-4373:
------------------------------
We should use the flag.
> HBaseAdmin.assign() doesnot use force flag
> ------------------------------------------
>
> Key: HBASE-4373
> URL: https://issues.apache.org/jira/browse/HBASE-4373
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> The HBaseAdmin.assign()
> {code}
> public void assign(final byte [] regionName, final boolean force)
> throws MasterNotRunningException, ZooKeeperConnectionException, IOException {
> getMaster().assign(regionName, force);
> }
> {code}
> In the HMaster we call
> {code}
> Pair<HRegionInfo, ServerName> pair =
> MetaReader.getRegion(this.catalogTracker, regionName);
> if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName));
> if (cpHost != null) {
> if (cpHost.preAssign(pair.getFirst(), force)) {
> return;
> }
> }
> assignRegion(pair.getFirst());
> if (cpHost != null) {
> cpHost.postAssign(pair.getFirst(), force);
> }
> {code}
> The force flag is not getting used. May be we need to update the javadoc or do not provide the force flag as a parameter if we are not going to use it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira