You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Harsh J (JIRA)" <ji...@apache.org> on 2011/09/13 12:06:09 UTC
[jira] [Updated] (HBASE-4384) Hard to tell what causes failure in
CloseRegionHandler#getCurrentVersion
[ https://issues.apache.org/jira/browse/HBASE-4384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harsh J updated HBASE-4384:
---------------------------
Description:
The current code goes like:
{code}
172 * Get the node's current version
173 * @return The expectedVersion. If -1, we failed getting the node
174 */
175 private int getCurrentVersion() {
176 int expectedVersion = FAILED;
177 try {
178 if ((expectedVersion = ZKAssign.getVersion(
179 server.getZooKeeper(), regionInfo)) == FAILED) {
180 LOG.warn("Error getting node's version in CLOSING state," +
181 " aborting close of " + regionInfo.getRegionNameAsString());
182 }
183 } catch (KeeperException e) {
184 LOG.warn("Error creating node in CLOSING state, aborting close of " +
185 regionInfo.getRegionNameAsString());
186 }
187 return expectedVersion;
188 }
189 }
{code}
Both WARN cases would be identical this way. In case of an exception, I think an exception ought to be logged as well.
was:
The current code goes like:
{code}
467 public static int createNodeClosing(ZooKeeperWatcher zkw, HRegionInfo region,
468 String serverName)
469 throws KeeperException, KeeperException.NodeExistsException {
470 LOG.debug(zkw.prefix("Creating unassigned node for " +
471 region.getEncodedName() + " in a CLOSING state"));
472
473 RegionTransitionData data = new RegionTransitionData(
474 EventType.RS_ZK_REGION_CLOSING, region.getRegionName(), serverName);
475
476 synchronized (zkw.getNodes()) {
477 String node = getNodeName(zkw, region.getEncodedName());
478 zkw.getNodes().add(node);
479 return ZKUtil.createAndWatch(zkw, node, data.getBytes());
480 }
481 }
{code}
Both WARN cases would be identical this way. In case of an exception, I think an exception ought to be logged as well.
Summary: Hard to tell what causes failure in CloseRegionHandler#getCurrentVersion (was: Hard to tell what causes failure in ZKAssign#createNodeClosing)
(Updated topic comment/desc.)
> Hard to tell what causes failure in CloseRegionHandler#getCurrentVersion
> ------------------------------------------------------------------------
>
> Key: HBASE-4384
> URL: https://issues.apache.org/jira/browse/HBASE-4384
> Project: HBase
> Issue Type: Task
> Components: zookeeper
> Affects Versions: 0.90.0
> Reporter: Harsh J
> Assignee: Harsh J
> Priority: Minor
> Fix For: 0.94.0
>
>
> The current code goes like:
> {code}
> 172 * Get the node's current version
> 173 * @return The expectedVersion. If -1, we failed getting the node
> 174 */
> 175 private int getCurrentVersion() {
> 176 int expectedVersion = FAILED;
> 177 try {
> 178 if ((expectedVersion = ZKAssign.getVersion(
> 179 server.getZooKeeper(), regionInfo)) == FAILED) {
> 180 LOG.warn("Error getting node's version in CLOSING state," +
> 181 " aborting close of " + regionInfo.getRegionNameAsString());
> 182 }
> 183 } catch (KeeperException e) {
> 184 LOG.warn("Error creating node in CLOSING state, aborting close of " +
> 185 regionInfo.getRegionNameAsString());
> 186 }
> 187 return expectedVersion;
> 188 }
> 189 }
> {code}
> Both WARN cases would be identical this way. In case of an exception, I think an exception ought to be logged as well.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira