You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/02/14 13:58:21 UTC
svn commit: r1446147 [20/35] - in /hbase/branches/hbase-7290v2: ./ bin/
conf/ dev-support/ hbase-client/ hbase-common/
hbase-common/src/main/java/org/apache/hadoop/hbase/
hbase-common/src/main/java/org/apache/hadoop/hbase/io/compress/
hbase-common/src/...
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HMerge.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HMerge.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HMerge.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HMerge.java Thu Feb 14 12:58:12 2013
@@ -415,7 +415,7 @@ class HMerge {
HConstants.SPLITA_QUALIFIER);
delete.deleteColumns(HConstants.CATALOG_FAMILY,
HConstants.SPLITB_QUALIFIER);
- root.delete(delete, null, true);
+ root.delete(delete, true);
if(LOG.isDebugEnabled()) {
LOG.debug("updated columns in row: " + Bytes.toStringBinary(regionsToDelete[r]));
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java Thu Feb 14 12:58:12 2013
@@ -237,28 +237,57 @@ public class JVMClusterUtil {
// Do active after.
if (activeMaster != null) activeMaster.master.shutdown();
}
+ boolean noWait = false;
+ final long maxTime = System.currentTimeMillis() + 120 * 1000;
if (regionservers != null) {
for (RegionServerThread t : regionservers) {
- if (t.isAlive()) {
+ t.getRegionServer().stop("Shutdown requested");
+ }
+ for (RegionServerThread t : regionservers) {
+ if (t.isAlive() && !noWait && System.currentTimeMillis() < maxTime) {
try {
- t.getRegionServer().stop("Shutdown requested");
- t.join();
+ t.join(maxTime);
} catch (InterruptedException e) {
- // continue
+ LOG.info("Got InterruptedException on shutdown - " +
+ "not waiting anymore on region server ends", e);
+ noWait = true; // someone wants us to speed up.
+ }
+ }
+ }
+
+ // Let's try to interrupt the remaining threads if any.
+ for (int i = 0; i < 10; ++i) {
+ for (RegionServerThread t : regionservers) {
+ if (t.isAlive()) {
+ try {
+ t.join(10);
+ } catch (InterruptedException e) {
+ noWait = true;
+ }
+ }
+ }
+ for (RegionServerThread t : regionservers) {
+ if (t.isAlive()) {
+ t.interrupt();
}
}
}
}
+
+
+
if (masters != null) {
for (JVMClusterUtil.MasterThread t : masters) {
- while (t.master.isAlive()) {
+ while (t.master.isAlive() && !noWait) {
try {
// The below has been replaced to debug sometime hangs on end of
// tests.
// this.master.join():
Threads.threadDumpingIsAlive(t.master.getThread());
} catch(InterruptedException e) {
- // continue
+ LOG.info("Got InterruptedException on shutdown - " +
+ "not waiting anymore on master ends", e);
+ noWait = true;
}
}
}
@@ -266,6 +295,10 @@ public class JVMClusterUtil {
LOG.info("Shutdown of " +
((masters != null) ? masters.size() : "0") + " master(s) and " +
((regionservers != null) ? regionservers.size() : "0") +
- " regionserver(s) complete");
+ " regionserver(s) " + (noWait ? "interrupted" : "complete"));
+
+ if (!noWait){
+ Thread.currentThread().interrupt();
+ }
}
}
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java Thu Feb 14 12:58:12 2013
@@ -151,13 +151,13 @@ public class Merge extends Configured im
HRegion rootRegion = utils.getRootRegion();
Get get = new Get(region1);
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result result1 = rootRegion.get(get, null);
+ Result result1 = rootRegion.get(get);
Preconditions.checkState(!result1.isEmpty(), "First region cells can not be null");
HRegionInfo info1 = HRegionInfo.getHRegionInfo(result1);
get = new Get(region2);
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result result2 = rootRegion.get(get, null);
+ Result result2 = rootRegion.get(get);
Preconditions.checkState(!result2.isEmpty(), "Second region cells can not be null");
HRegionInfo info2 = HRegionInfo.getHRegionInfo(result2);
HRegion merged = merge(HTableDescriptor.META_TABLEDESC, info1, rootRegion, info2, rootRegion);
@@ -222,7 +222,7 @@ public class Merge extends Configured im
HRegion metaRegion1 = this.utils.getMetaRegion(meta1);
Get get = new Get(region1);
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result result1 = metaRegion1.get(get, null);
+ Result result1 = metaRegion1.get(get);
Preconditions.checkState(!result1.isEmpty(),
"First region cells can not be null");
HRegionInfo info1 = HRegionInfo.getHRegionInfo(result1);
@@ -239,7 +239,7 @@ public class Merge extends Configured im
}
get = new Get(region2);
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result result2 = metaRegion2.get(get, null);
+ Result result2 = metaRegion2.get(get);
Preconditions.checkState(!result2.isEmpty(),
"Second region cells can not be null");
HRegionInfo info2 = HRegionInfo.getHRegionInfo(result2);
@@ -335,8 +335,8 @@ public class Merge extends Configured im
}
Delete delete = new Delete(regioninfo.getRegionName(),
- System.currentTimeMillis(), null);
- meta.delete(delete, null, true);
+ System.currentTimeMillis());
+ meta.delete(delete, true);
}
/*
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java Thu Feb 14 12:58:12 2013
@@ -330,7 +330,7 @@ public class MetaUtils {
if (LOG.isDebugEnabled()) {
Get get = new Get(hri.getRegionName());
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result res = r.get(get, null);
+ Result res = r.get(get);
KeyValue [] kvs = res.raw();
if(kvs.length <= 0) {
return;
@@ -351,7 +351,7 @@ public class MetaUtils {
if (LOG.isDebugEnabled()) {
Get get = new Get(hri.getRegionName());
get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
- Result res = r.get(get, null);
+ Result res = r.get(get);
KeyValue [] kvs = res.raw();
if(kvs.length <= 0) {
return;
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/EmptyWatcher.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/EmptyWatcher.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/EmptyWatcher.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/EmptyWatcher.java Thu Feb 14 12:58:12 2013
@@ -27,7 +27,7 @@ import org.apache.zookeeper.WatchedEvent
@InterfaceAudience.Private
public class EmptyWatcher implements Watcher {
// Used in this package but also by tests so needs to be public
- public static EmptyWatcher instance = new EmptyWatcher();
+ public static final EmptyWatcher instance = new EmptyWatcher();
private EmptyWatcher() {}
public void process(WatchedEvent event) {}
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java Thu Feb 14 12:58:12 2013
@@ -18,6 +18,9 @@
*/
package org.apache.hadoop.hbase.zookeeper;
+import static org.apache.hadoop.hbase.HConstants.DEFAULT_ZK_SESSION_TIMEOUT;
+import static org.apache.hadoop.hbase.HConstants.ZK_SESSION_TIMEOUT;
+
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
@@ -27,8 +30,8 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
-import java.util.Properties;
import java.util.Map.Entry;
+import java.util.Properties;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
@@ -137,7 +140,7 @@ public class HQuorumPeer {
// Set the max session timeout from the provided client-side timeout
properties.setProperty("maxSessionTimeout",
- conf.get("zookeeper.session.timeout", "180000"));
+ conf.get(ZK_SESSION_TIMEOUT, Integer.toString(DEFAULT_ZK_SESSION_TIMEOUT)));
if (myId == -1) {
throw new IOException("Could not find my address: " + myAddress +
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java Thu Feb 14 12:58:12 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.security.SecureRandom;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@@ -35,11 +36,16 @@ import org.apache.hadoop.hbase.util.Retr
import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.Op;
+import org.apache.zookeeper.OpResult;
import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.ZooKeeper.States;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.proto.CreateRequest;
+import org.apache.zookeeper.proto.SetDataRequest;
/**
* A zookeeper that can handle 'recoverable' errors.
@@ -69,7 +75,7 @@ import org.apache.zookeeper.data.Stat;
public class RecoverableZooKeeper {
private static final Log LOG = LogFactory.getLog(RecoverableZooKeeper.class);
// the actual ZooKeeper client instance
- private ZooKeeper zk;
+ volatile private ZooKeeper zk;
private final RetryCounterFactory retryCounterFactory;
// An identifier of this process in the cluster
private final String identifier;
@@ -494,6 +500,60 @@ public class RecoverableZooKeeper {
retryCounter.useRetry();
}
}
+ /**
+ * Convert Iterable of {@link ZKOp} we got into the ZooKeeper.Op
+ * instances to actually pass to multi (need to do this in order to appendMetaData).
+ */
+ private Iterable<Op> prepareZKMulti(Iterable<Op> ops)
+ throws UnsupportedOperationException {
+ if(ops == null) return null;
+
+ List<Op> preparedOps = new LinkedList<Op>();
+ for (Op op : ops) {
+ if (op.getType() == ZooDefs.OpCode.create) {
+ CreateRequest create = (CreateRequest)op.toRequestRecord();
+ preparedOps.add(Op.create(create.getPath(), appendMetaData(create.getData()),
+ create.getAcl(), create.getFlags()));
+ } else if (op.getType() == ZooDefs.OpCode.delete) {
+ // no need to appendMetaData for delete
+ preparedOps.add(op);
+ } else if (op.getType() == ZooDefs.OpCode.setData) {
+ SetDataRequest setData = (SetDataRequest)op.toRequestRecord();
+ preparedOps.add(Op.setData(setData.getPath(), appendMetaData(setData.getData()),
+ setData.getVersion()));
+ } else {
+ throw new UnsupportedOperationException("Unexpected ZKOp type: " + op.getClass().getName());
+ }
+ }
+ return preparedOps;
+ }
+
+ /**
+ * Run multiple operations in a transactional manner. Retry before throwing exception
+ */
+ public List<OpResult> multi(Iterable<Op> ops)
+ throws KeeperException, InterruptedException {
+ RetryCounter retryCounter = retryCounterFactory.create();
+ Iterable<Op> multiOps = prepareZKMulti(ops);
+ while (true) {
+ try {
+ return zk.multi(multiOps);
+ } catch (KeeperException e) {
+ switch (e.code()) {
+ case CONNECTIONLOSS:
+ case SESSIONEXPIRED:
+ case OPERATIONTIMEOUT:
+ retryOrThrow(retryCounter, e, "multi");
+ break;
+
+ default:
+ throw e;
+ }
+ }
+ retryCounter.sleepUntilNextRetry();
+ retryCounter.useRetry();
+ }
+ }
private String findPreviousSequentialNode(String path)
throws KeeperException, InterruptedException {
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RootRegionTracker.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RootRegionTracker.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RootRegionTracker.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RootRegionTracker.java Thu Feb 14 12:58:12 2013
@@ -28,8 +28,7 @@ import org.apache.zookeeper.KeeperExcept
/**
* Tracks the root region server location node in zookeeper.
- * Root region location is set by {@link RootLocationEditor} usually called
- * out of <code>RegionServerServices</code>.
+ * Root region location is set by <code>RegionServerServices</code>.
* This class has a watcher on the root location and notices changes.
*/
@InterfaceAudience.Private
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java Thu Feb 14 12:58:12 2013
@@ -176,7 +176,8 @@ public class ZKAssign {
LOG.debug(zkw.prefix("Async create of unassigned node for " +
region.getEncodedName() + " with OFFLINE state"));
RegionTransition rt =
- RegionTransition.createRegionTransition(EventType.M_ZK_REGION_OFFLINE, region.getRegionName(), serverName);
+ RegionTransition.createRegionTransition(
+ EventType.M_ZK_REGION_OFFLINE, region.getRegionName(), serverName);
String node = getNodeName(zkw, region.getEncodedName());
ZKUtil.asyncCreate(zkw, node, rt.toByteArray(), cb, ctx);
}
@@ -258,14 +259,14 @@ public class ZKAssign {
* of the specified regions transition.
*
* @param zkw zk reference
- * @param regionName opened region to be deleted from zk
+ * @param encodedRegionName opened region to be deleted from zk
* @throws KeeperException if unexpected zookeeper exception
* @throws KeeperException.NoNodeException if node does not exist
*/
public static boolean deleteOpenedNode(ZooKeeperWatcher zkw,
- String regionName)
+ String encodedRegionName)
throws KeeperException, KeeperException.NoNodeException {
- return deleteNode(zkw, regionName, EventType.RS_ZK_REGION_OPENED);
+ return deleteNode(zkw, encodedRegionName, EventType.RS_ZK_REGION_OPENED);
}
/**
@@ -283,14 +284,14 @@ public class ZKAssign {
* that has died are all set to OFFLINE before being processed.
*
* @param zkw zk reference
- * @param regionName closed region to be deleted from zk
+ * @param encodedRegionName closed region to be deleted from zk
* @throws KeeperException if unexpected zookeeper exception
* @throws KeeperException.NoNodeException if node does not exist
*/
public static boolean deleteOfflineNode(ZooKeeperWatcher zkw,
- String regionName)
+ String encodedRegionName)
throws KeeperException, KeeperException.NoNodeException {
- return deleteNode(zkw, regionName, EventType.M_ZK_REGION_OFFLINE);
+ return deleteNode(zkw, encodedRegionName, EventType.M_ZK_REGION_OFFLINE);
}
/**
@@ -309,14 +310,14 @@ public class ZKAssign {
* of the specified regions transition to being closed.
*
* @param zkw zk reference
- * @param regionName closed region to be deleted from zk
+ * @param encodedRegionName closed region to be deleted from zk
* @throws KeeperException if unexpected zookeeper exception
* @throws KeeperException.NoNodeException if node does not exist
*/
public static boolean deleteClosedNode(ZooKeeperWatcher zkw,
- String regionName)
+ String encodedRegionName)
throws KeeperException, KeeperException.NoNodeException {
- return deleteNode(zkw, regionName, EventType.RS_ZK_REGION_CLOSED);
+ return deleteNode(zkw, encodedRegionName, EventType.RS_ZK_REGION_CLOSED);
}
/**
@@ -342,8 +343,8 @@ public class ZKAssign {
public static boolean deleteClosingNode(ZooKeeperWatcher zkw,
HRegionInfo region)
throws KeeperException, KeeperException.NoNodeException {
- String regionName = region.getEncodedName();
- return deleteNode(zkw, regionName, EventType.M_ZK_REGION_CLOSING);
+ String encodedRegionName = region.getEncodedName();
+ return deleteNode(zkw, encodedRegionName, EventType.M_ZK_REGION_CLOSING);
}
/**
@@ -362,15 +363,15 @@ public class ZKAssign {
* of the specified regions transition to being closed/opened.
*
* @param zkw zk reference
- * @param regionName region to be deleted from zk
+ * @param encodedRegionName region to be deleted from zk
* @param expectedState state region must be in for delete to complete
* @throws KeeperException if unexpected zookeeper exception
* @throws KeeperException.NoNodeException if node does not exist
*/
- public static boolean deleteNode(ZooKeeperWatcher zkw, String regionName,
+ public static boolean deleteNode(ZooKeeperWatcher zkw, String encodedRegionName,
EventType expectedState)
throws KeeperException, KeeperException.NoNodeException {
- return deleteNode(zkw, regionName, expectedState, -1);
+ return deleteNode(zkw, encodedRegionName, expectedState, -1);
}
/**
@@ -389,7 +390,7 @@ public class ZKAssign {
* of the specified regions transition to being closed/opened.
*
* @param zkw zk reference
- * @param regionName region to be deleted from zk
+ * @param encodedRegionName region to be deleted from zk
* @param expectedState state region must be in for delete to complete
* @param expectedVersion of the znode that is to be deleted.
* If expectedVersion need not be compared while deleting the znode
@@ -397,12 +398,12 @@ public class ZKAssign {
* @throws KeeperException if unexpected zookeeper exception
* @throws KeeperException.NoNodeException if node does not exist
*/
- public static boolean deleteNode(ZooKeeperWatcher zkw, String regionName,
+ public static boolean deleteNode(ZooKeeperWatcher zkw, String encodedRegionName,
EventType expectedState, int expectedVersion)
throws KeeperException, KeeperException.NoNodeException {
LOG.debug(zkw.prefix("Deleting existing unassigned " +
- "node for " + regionName + " that is in expected state " + expectedState));
- String node = getNodeName(zkw, regionName);
+ "node for " + encodedRegionName + " that is in expected state " + expectedState));
+ String node = getNodeName(zkw, encodedRegionName);
zkw.sync(node);
Stat stat = new Stat();
byte [] bytes = ZKUtil.getDataNoWatch(zkw, node, stat);
@@ -413,24 +414,24 @@ public class ZKAssign {
RegionTransition rt = getRegionTransition(bytes);
EventType et = rt.getEventType();
if (!et.equals(expectedState)) {
- LOG.warn(zkw.prefix("Attempting to delete unassigned node " + regionName + " in " +
+ LOG.warn(zkw.prefix("Attempting to delete unassigned node " + encodedRegionName + " in " +
expectedState + " state but node is in " + et + " state"));
return false;
}
if (expectedVersion != -1
&& stat.getVersion() != expectedVersion) {
- LOG.warn("The node " + regionName + " we are trying to delete is not" +
+ LOG.warn("The node " + encodedRegionName + " we are trying to delete is not" +
" the expected one. Got a version mismatch");
return false;
}
if(!ZKUtil.deleteNode(zkw, node, stat.getVersion())) {
LOG.warn(zkw.prefix("Attempting to delete " +
- "unassigned node " + regionName + " in " + expectedState +
+ "unassigned node " + encodedRegionName + " in " + expectedState +
" state but after verifying state, we got a version mismatch"));
return false;
}
LOG.debug(zkw.prefix("Successfully deleted unassigned node for region " +
- regionName + " in expected state " + expectedState));
+ encodedRegionName + " in expected state " + expectedState));
return true;
}
@@ -631,6 +632,51 @@ public class ZKAssign {
}
/**
+ *
+ * @param zkw zk reference
+ * @param region region to be closed
+ * @param expectedVersion expected version of the znode
+ * @return true if the znode exists, has the right version and the right state. False otherwise.
+ * @throws KeeperException
+ */
+ public static boolean checkClosingState(ZooKeeperWatcher zkw, HRegionInfo region,
+ int expectedVersion) throws KeeperException {
+
+ final String encoded = getNodeName(zkw, region.getEncodedName());
+ zkw.sync(encoded);
+
+ // Read existing data of the node
+ Stat stat = new Stat();
+ byte[] existingBytes = ZKUtil.getDataNoWatch(zkw, encoded, stat);
+
+ if (existingBytes == null) {
+ LOG.warn(zkw.prefix("Attempt to check the " +
+ "closing node for " + encoded +
+ ". The node does not exist"));
+ return false;
+ }
+
+ if (expectedVersion != -1 && stat.getVersion() != expectedVersion) {
+ LOG.warn(zkw.prefix("Attempt to check the " +
+ "closing node for " + encoded +
+ ". The node existed but was version " + stat.getVersion() +
+ " not the expected version " + expectedVersion));
+ return false;
+ }
+
+ RegionTransition rt = getRegionTransition(existingBytes);
+
+ if (!EventType.M_ZK_REGION_CLOSING.equals(rt.getEventType())) {
+ LOG.warn(zkw.prefix("Attempt to check the " +
+ "closing node for " + encoded +
+ ". The node existed but was in an unexpected state: " + rt.getEventType()));
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
* Method that actually performs unassigned node transitions.
*
* <p>Attempts to transition the unassigned node for the specified region
@@ -722,7 +768,8 @@ public class ZKAssign {
// Write new data, ensuring data has not changed since we last read it
try {
- rt = RegionTransition.createRegionTransition(endState, region.getRegionName(), serverName, payload);
+ rt = RegionTransition.createRegionTransition(
+ endState, region.getRegionName(), serverName, payload);
if(!ZKUtil.setData(zkw, node, rt.toByteArray(), stat.getVersion())) {
LOG.warn(zkw.prefix("Attempt to transition the " +
"unassigned node for " + encoded +
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTableReadOnly.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTableReadOnly.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTableReadOnly.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTableReadOnly.java Thu Feb 14 12:58:12 2013
@@ -43,7 +43,7 @@ public class ZKTableReadOnly {
private ZKTableReadOnly() {}
/**
- * Go to zookeeper and see if state of table is {@link ZooKeeperProtos.Table.State#DISABLED}.
+ * Go to zookeeper and see if state of table is {@code ZooKeeperProtos.Table.State#DISABLED}.
* This method does not use cache.
* This method is for clients other than {@link AssignmentManager}
* @param zkw
@@ -59,7 +59,7 @@ public class ZKTableReadOnly {
}
/**
- * Go to zookeeper and see if state of table is {@link ZooKeeperProtos.Table.State#ENABLED}.
+ * Go to zookeeper and see if state of table is {@code ZooKeeperProtos.Table.State#ENABLED}.
* This method does not use cache.
* This method is for clients other than {@link AssignmentManager}
* @param zkw
@@ -74,8 +74,8 @@ public class ZKTableReadOnly {
}
/**
- * Go to zookeeper and see if state of table is {@link ZooKeeperProtos.Table.State#DISABLING}
- * of {@link ZooKeeperProtos.Table.State#DISABLED}.
+ * Go to zookeeper and see if state of table is {@code ZooKeeperProtos.Table.State#DISABLING}
+ * of {@code ZooKeeperProtos.Table.State#DISABLED}.
* This method does not use cache.
* This method is for clients other than {@link AssignmentManager}.
* @param zkw
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java Thu Feb 14 12:58:12 2013
@@ -25,7 +25,9 @@ import java.io.PrintWriter;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -44,18 +46,25 @@ import org.apache.hadoop.hbase.HConstant
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Threads;
+import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.CreateAndFailSilent;
+import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent;
+import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.SetData;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.authentication.util.KerberosUtil;
import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NoNodeException;
+import org.apache.zookeeper.Op;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.client.ZooKeeperSaslClient;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.proto.CreateRequest;
+import org.apache.zookeeper.proto.DeleteRequest;
+import org.apache.zookeeper.proto.SetDataRequest;
import org.apache.zookeeper.server.ZooKeeperSaslServer;
/**
@@ -882,7 +891,13 @@ public class ZKUtil {
*/
public static void setData(ZooKeeperWatcher zkw, String znode, byte [] data)
throws KeeperException, KeeperException.NoNodeException {
- setData(zkw, znode, data, -1);
+ setData(zkw, (SetData)ZKUtilOp.setData(znode, data));
+ }
+
+ private static void setData(ZooKeeperWatcher zkw, SetData setData)
+ throws KeeperException, KeeperException.NoNodeException {
+ SetDataRequest sd = (SetDataRequest)toZooKeeperOp(zkw, setData).toRequestRecord();
+ setData(zkw, sd.getPath(), sd.getData(), sd.getVersion());
}
/**
@@ -911,6 +926,7 @@ public class ZKUtil {
(node.equals(zkw.clusterIdZNode) == true) ||
(node.equals(zkw.rsZNode) == true) ||
(node.equals(zkw.backupMasterAddressesZNode) == true) ||
+ (node.startsWith(zkw.assignmentZNode) == true) ||
(node.startsWith(zkw.tableZNode) == true)) {
return ZooKeeperWatcher.CREATOR_ALL_AND_WORLD_READABLE;
}
@@ -1036,7 +1052,13 @@ public class ZKUtil {
waitForZKConnectionIfAuthenticating(zkw);
zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode),
CreateMode.PERSISTENT);
- return zkw.getRecoverableZooKeeper().exists(znode, zkw).getVersion();
+ Stat stat = zkw.getRecoverableZooKeeper().exists(znode, zkw);
+ if (stat == null){
+ // Likely a race condition. Someone deleted the znode.
+ throw KeeperException.create(KeeperException.Code.SYSTEMERROR,
+ "ZK.exists returned null (i.e.: znode does not exist) for znode=" + znode);
+ }
+ return stat.getVersion();
} catch (InterruptedException e) {
zkw.interruptedException(e);
return -1;
@@ -1081,8 +1103,7 @@ public class ZKUtil {
* @throws KeeperException if unexpected zookeeper exception
*/
public static void createAndFailSilent(ZooKeeperWatcher zkw,
- String znode)
- throws KeeperException {
+ String znode) throws KeeperException {
createAndFailSilent(zkw, znode, new byte[0]);
}
@@ -1100,12 +1121,19 @@ public class ZKUtil {
public static void createAndFailSilent(ZooKeeperWatcher zkw,
String znode, byte[] data)
throws KeeperException {
+ createAndFailSilent(zkw,
+ (CreateAndFailSilent)ZKUtilOp.createAndFailSilent(znode, data));
+ }
+
+ private static void createAndFailSilent(ZooKeeperWatcher zkw, CreateAndFailSilent cafs)
+ throws KeeperException {
+ CreateRequest create = (CreateRequest)toZooKeeperOp(zkw, cafs).toRequestRecord();
+ String znode = create.getPath();
try {
RecoverableZooKeeper zk = zkw.getRecoverableZooKeeper();
waitForZKConnectionIfAuthenticating(zkw);
if (zk.exists(znode, false) == null) {
- zk.create(znode, data, createACL(zkw,znode),
- CreateMode.PERSISTENT);
+ zk.create(znode, create.getData(), create.getAcl(), CreateMode.fromFlag(create.getFlags()));
}
} catch(KeeperException.NodeExistsException nee) {
} catch(KeeperException.NoAuthException nee){
@@ -1209,14 +1237,22 @@ public class ZKUtil {
*/
public static void deleteNodeFailSilent(ZooKeeperWatcher zkw, String node)
throws KeeperException {
+ deleteNodeFailSilent(zkw,
+ (DeleteNodeFailSilent)ZKUtilOp.deleteNodeFailSilent(node));
+ }
+
+ private static void deleteNodeFailSilent(ZooKeeperWatcher zkw,
+ DeleteNodeFailSilent dnfs) throws KeeperException {
+ DeleteRequest delete = (DeleteRequest)toZooKeeperOp(zkw, dnfs).toRequestRecord();
try {
- zkw.getRecoverableZooKeeper().delete(node, -1);
+ zkw.getRecoverableZooKeeper().delete(delete.getPath(), delete.getVersion());
} catch(KeeperException.NoNodeException nne) {
} catch(InterruptedException ie) {
zkw.interruptedException(ie);
}
}
+
/**
* Delete the specified node and all of it's children.
* <p>
@@ -1258,6 +1294,232 @@ public class ZKUtil {
}
}
+ /**
+ * Represents an action taken by ZKUtil, e.g. createAndFailSilent.
+ * These actions are higher-level than ZKOp actions, which represent
+ * individual actions in the ZooKeeper API, like create.
+ */
+ public abstract static class ZKUtilOp {
+ private String path;
+
+ private ZKUtilOp(String path) {
+ this.path = path;
+ }
+
+ /**
+ * @return a createAndFailSilent ZKUtilOp
+ */
+ public static ZKUtilOp createAndFailSilent(String path, byte[] data) {
+ return new CreateAndFailSilent(path, data);
+ }
+
+ /**
+ * @return a deleteNodeFailSilent ZKUtilOP
+ */
+ public static ZKUtilOp deleteNodeFailSilent(String path) {
+ return new DeleteNodeFailSilent(path);
+ }
+
+ /**
+ * @return a setData ZKUtilOp
+ */
+ public static ZKUtilOp setData(String path, byte [] data) {
+ return new SetData(path, data);
+ }
+
+ /**
+ * @return path to znode where the ZKOp will occur
+ */
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * ZKUtilOp representing createAndFailSilent in ZooKeeper
+ * (attempt to create node, ignore error if already exists)
+ */
+ public static class CreateAndFailSilent extends ZKUtilOp {
+ private byte [] data;
+
+ private CreateAndFailSilent(String path, byte [] data) {
+ super(path);
+ this.data = data;
+ }
+
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof CreateAndFailSilent)) return false;
+
+ CreateAndFailSilent op = (CreateAndFailSilent) o;
+ return getPath().equals(op.getPath()) && Arrays.equals(data, op.data);
+ }
+
+ @Override
+ public int hashCode() {
+ int ret = 17 + getPath().hashCode() * 31;
+ return ret * 31 + Bytes.hashCode(data);
+ }
+ }
+
+ /**
+ * ZKUtilOp representing deleteNodeFailSilent in ZooKeeper
+ * (attempt to delete node, ignore error if node doesn't exist)
+ */
+ public static class DeleteNodeFailSilent extends ZKUtilOp {
+ private DeleteNodeFailSilent(String path) {
+ super(path);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof DeleteNodeFailSilent)) return false;
+
+ return super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return getPath().hashCode();
+ }
+ }
+
+ /**
+ * ZKUtilOp representing setData in ZooKeeper
+ */
+ public static class SetData extends ZKUtilOp {
+ private byte [] data;
+
+ private SetData(String path, byte [] data) {
+ super(path);
+ this.data = data;
+ }
+
+ public byte[] getData() {
+ return data;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof SetData)) return false;
+
+ SetData op = (SetData) o;
+ return getPath().equals(op.getPath()) && Arrays.equals(data, op.data);
+ }
+
+ @Override
+ public int hashCode() {
+ int ret = getPath().hashCode();
+ return ret * 31 + Bytes.hashCode(data);
+ }
+ }
+ }
+
+ /**
+ * Convert from ZKUtilOp to ZKOp
+ */
+ private static Op toZooKeeperOp(ZooKeeperWatcher zkw, ZKUtilOp op)
+ throws UnsupportedOperationException {
+ if(op == null) return null;
+
+ if (op instanceof CreateAndFailSilent) {
+ CreateAndFailSilent cafs = (CreateAndFailSilent)op;
+ return Op.create(cafs.getPath(), cafs.getData(), createACL(zkw, cafs.getPath()),
+ CreateMode.PERSISTENT);
+ } else if (op instanceof DeleteNodeFailSilent) {
+ DeleteNodeFailSilent dnfs = (DeleteNodeFailSilent)op;
+ return Op.delete(dnfs.getPath(), -1);
+ } else if (op instanceof SetData) {
+ SetData sd = (SetData)op;
+ return Op.setData(sd.getPath(), sd.getData(), -1);
+ } else {
+ throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ + op.getClass().getName());
+ }
+ }
+
+ /**
+ * If hbase.zookeeper.useMulti is true, use ZooKeeper's multi-update functionality.
+ * Otherwise, run the list of operations sequentially.
+ *
+ * If all of the following are true:
+ * - runSequentialOnMultiFailure is true
+ * - hbase.zookeeper.useMulti is true
+ * - on calling multi, we get a ZooKeeper exception that can be handled by a sequential call(*)
+ * Then:
+ * - we retry the operations one-by-one (sequentially)
+ *
+ * Note *: an example is receiving a NodeExistsException from a "create" call. Without multi,
+ * a user could call "createAndFailSilent" to ensure that a node exists if they don't care who
+ * actually created the node (i.e. the NodeExistsException from ZooKeeper is caught).
+ * This will cause all operations in the multi to fail, however, because
+ * the NodeExistsException that zk.create throws will fail the multi transaction.
+ * In this case, if the previous conditions hold, the commands are run sequentially, which should
+ * result in the correct final state, but means that the operations will not run atomically.
+ *
+ * @throws KeeperException
+ */
+ public static void multiOrSequential(ZooKeeperWatcher zkw, List<ZKUtilOp> ops,
+ boolean runSequentialOnMultiFailure) throws KeeperException {
+ if (ops == null) return;
+ boolean useMulti = zkw.getConfiguration().getBoolean(HConstants.ZOOKEEPER_USEMULTI, false);
+
+ if (useMulti) {
+ List<Op> zkOps = new LinkedList<Op>();
+ for (ZKUtilOp op : ops) {
+ zkOps.add(toZooKeeperOp(zkw, op));
+ }
+ try {
+ zkw.getRecoverableZooKeeper().multi(zkOps);
+ } catch (KeeperException ke) {
+ switch (ke.code()) {
+ case NODEEXISTS:
+ case NONODE:
+ case BADVERSION:
+ case NOAUTH:
+ // if we get an exception that could be solved by running sequentially
+ // (and the client asked us to), then break out and run sequentially
+ if (runSequentialOnMultiFailure) {
+ LOG.info("On call to ZK.multi, received exception: " + ke.toString() + "."
+ + " Attempting to run operations sequentially because"
+ + " runSequentialOnMultiFailure is: " + runSequentialOnMultiFailure + ".");
+ processSequentially(zkw, ops);
+ break;
+ }
+ default:
+ throw ke;
+ }
+ } catch (InterruptedException ie) {
+ zkw.interruptedException(ie);
+ }
+ } else {
+ // run sequentially
+ processSequentially(zkw, ops);
+ }
+ }
+
+ private static void processSequentially(ZooKeeperWatcher zkw, List<ZKUtilOp> ops)
+ throws KeeperException, NoNodeException {
+ for (ZKUtilOp op : ops) {
+ if (op instanceof CreateAndFailSilent) {
+ createAndFailSilent(zkw, (CreateAndFailSilent) op);
+ } else if (op instanceof DeleteNodeFailSilent) {
+ deleteNodeFailSilent(zkw, (DeleteNodeFailSilent) op);
+ } else if (op instanceof SetData) {
+ setData(zkw, (SetData) op);
+ } else {
+ throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ + op.getClass().getName());
+ }
+ }
+ }
+
//
// ZooKeeper cluster information
//
@@ -1283,6 +1545,11 @@ public class ZKUtil {
for (String child : listChildrenNoWatch(zkw, zkw.rsZNode)) {
sb.append("\n ").append(child);
}
+ try {
+ getReplicationZnodesDump(zkw, sb);
+ } catch (KeeperException ke) {
+ LOG.warn("Couldn't get the replication znode dump." + ke.getStackTrace());
+ }
sb.append("\nQuorum Server Statistics:");
String[] servers = zkw.getQuorum().split(",");
for (String server : servers) {
@@ -1309,6 +1576,25 @@ public class ZKUtil {
return sb.toString();
}
+ private static void getReplicationZnodesDump(ZooKeeperWatcher zkw, StringBuilder sb)
+ throws KeeperException {
+ String replicationZNodeName = zkw.getConfiguration().get("zookeeper.znode.replication",
+ "replication");
+ String replicationZnode = joinZNode(zkw.baseZNode, replicationZNodeName);
+ if (ZKUtil.checkExists(zkw, replicationZnode) == -1) return;
+ // do a ls -r on this znode
+ List<String> stack = new LinkedList<String>();
+ stack.add(replicationZnode);
+ do {
+ String znodeToProcess = stack.remove(stack.size() - 1);
+ sb.append("\n").append(znodeToProcess).append(": ")
+ .append(Bytes.toString(ZKUtil.getData(zkw, znodeToProcess)));
+ for (String zNodeChild : ZKUtil.listChildrenNoWatch(zkw, znodeToProcess)) {
+ stack.add(ZKUtil.joinZNode(znodeToProcess, zNodeChild));
+ }
+ } while (stack.size() > 0);
+ }
+
/**
* Gets the statistics from the given server.
*
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java Thu Feb 14 12:58:12 2013
@@ -159,7 +159,7 @@ public class ZooKeeperWatcher implements
private void createBaseZNodes() throws ZooKeeperConnectionException {
try {
// Create all the necessary "directories" of znodes
- ZKUtil.createAndFailSilent(this, baseZNode);
+ ZKUtil.createWithParents(this, baseZNode);
ZKUtil.createAndFailSilent(this, assignmentZNode);
ZKUtil.createAndFailSilent(this, rsZNode);
ZKUtil.createAndFailSilent(this, drainingZNode);
@@ -204,9 +204,9 @@ public class ZooKeeperWatcher implements
backupMasterAddressesZNode = ZKUtil.joinZNode(baseZNode,
conf.get("zookeeper.znode.backup.masters", "backup-masters"));
clusterStateZNode = ZKUtil.joinZNode(baseZNode,
- conf.get("zookeeper.znode.state", "shutdown"));
+ conf.get("zookeeper.znode.state", "running"));
assignmentZNode = ZKUtil.joinZNode(baseZNode,
- conf.get("zookeeper.znode.unassigned", "unassigned"));
+ conf.get("zookeeper.znode.unassigned", "region-in-transition"));
tableZNode = ZKUtil.joinZNode(baseZNode,
conf.get("zookeeper.znode.tableEnableDisable", "table"));
clusterIdZNode = ZKUtil.joinZNode(baseZNode,
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-default.xml?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-default.xml (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-default.xml Thu Feb 14 12:58:12 2013
@@ -49,7 +49,7 @@
</property>
<property>
<name>hbase.tmp.dir</name>
- <value>/tmp/hbase-${user.name}</value>
+ <value>${java.io.tmpdir}/hbase-${user.name}</value>
<description>Temporary directory on the local filesystem.
Change this setting to point to a location more permanent
than '/tmp' (The '/tmp' directory is often cleared on
@@ -57,6 +57,13 @@
</description>
</property>
<property>
+ <name>hbase.local.dir</name>
+ <value>${hbase.tmp.dir}/local/</value>
+ <description>Directory on the local filesystem to be used
+ as a local storage.
+ </description>
+ </property>
+ <property>
<name>hbase.master.info.port</name>
<value>60010</value>
<description>The port for the HBase Master web UI.
@@ -160,12 +167,6 @@
60 seconds. </description>
</property>
<property>
- <name>hbase.regionserver.rowlock.timeout.period</name>
- <value>60000</value>
- <description>Row lock time out period in milliseconds. Default is
- 60 seconds. </description>
- </property>
- <property>
<name>hbase.regionserver.handler.count</name>
<value>10</value>
<description>Count of RPC Listener instances spun up on RegionServers.
@@ -521,11 +522,12 @@
block is finished.
</description>
</property>
+
<property>
- <name>hbase.rpc.engine</name>
- <value>org.apache.hadoop.hbase.ipc.ProtobufRpcEngine</value>
- <description>Implementation of org.apache.hadoop.hbase.ipc.RpcEngine to be
- used for client / server RPC call marshalling.
+ <name>hbase.rpc.server.engine</name>
+ <value>org.apache.hadoop.hbase.ipc.ProtobufRpcServerEngine</value>
+ <description>Implementation of org.apache.hadoop.hbase.ipc.RpcServerEngine to be
+ used for server RPC call marshalling.
</description>
</property>
<property>
@@ -697,6 +699,18 @@
for more information.
</description>
</property>
+ <property>
+ <name>hbase.zookeeper.useMulti</name>
+ <value>false</value>
+ <description>Instructs HBase to make use of ZooKeeper's multi-update functionality.
+ This allows certain ZooKeeper operations to complete more quickly and prevents some issues
+ with rare Replication failure scenarios (see the release note of HBASE-2611 for an example).
+ IMPORTANT: only set this to true if all ZooKeeper servers in the cluster are on version 3.4+
+ and will not be downgraded. ZooKeeper versions before 3.4 do not support multi-update and will
+ not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495).
+ </description>
+ </property>
+
<!-- End of properties used to generate ZooKeeper host:port quorum list. -->
<!--
@@ -929,4 +943,28 @@
Set to true to allow snapshots to be taken / restored / cloned.
</description>
</property>
+ <property>
+ <name>hbase.rest.threads.max</name>
+ <value>100</value>
+ <description>
+ The maximum number of threads of the REST server thread pool.
+ Threads in the pool are reused to process REST requests. This
+ controls the maximum number of requests processed concurrently.
+ It may help to control the memory used by the REST server to
+ avoid OOM issues. If the thread pool is full, incoming requests
+ will be queued up and wait for some free threads. The default
+ is 100.
+ </description>
+ </property>
+ <property>
+ <name>hbase.rest.threads.min</name>
+ <value>2</value>
+ <description>
+ The minimum number of threads of the REST server thread pool.
+ The thread pool always has at least these number of threads so
+ the REST server is ready to serve incoming requests. The default
+ is 2.
+>>>>>>> apache/trunk
+ </description>
+ </property>
</configuration>
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp Thu Feb 14 12:58:12 2013
@@ -169,7 +169,7 @@
<%
} // end else
-HConnectionManager.deleteConnection(hbadmin.getConfiguration(), false);
+HConnectionManager.deleteConnection(hbadmin.getConfiguration());
%>
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/table.jsp?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/table.jsp (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/table.jsp Thu Feb 14 12:58:12 2013
@@ -91,7 +91,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="/master-status">HBase Master</a>
+ <a class="brand" href="/master-status"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="/">Home</a></li>
@@ -108,12 +108,11 @@
<div class="container">
- <div class="row inner_header">
- <div class="span8">
- <h1>Table action request accepted</h1>
- </div>
- <div class="span4 logo">
- <img src="/static/hbase_logo.png" height="66" width="266" alt="HBase logo"/>
+ <div class="container">
+ <div class="row inner_header">
+ <div class="page-header">
+ <h1>Table action request accepted</h1>
+ </div>
</div>
</div>
<p><hr><p>
@@ -183,14 +182,14 @@
<div class="container">
- <div class="row">
- <div class="span8">
- <h1>Table: <%= tableName %></h1>
- </div>
- <div class="span4">
- <img src="/static/hbase_logo.png" height="66" width="266" alt="HBase logo"/>
+ <div class="container">
+ <div class="row inner_header">
+ <div class="page-header">
+ <h1>Table <small><%= tableName %></small></h1>
+ </div>
</div>
</div>
+ <div class="row">
<%
if(tableName.equals(Bytes.toString(HConstants.ROOT_TABLE_NAME))) {
%>
@@ -319,7 +318,7 @@
}
} // end else
-HConnectionManager.deleteConnection(hbadmin.getConfiguration(), false);
+HConnectionManager.deleteConnection(hbadmin.getConfiguration());
%>
@@ -361,6 +360,7 @@ Actions:
</center>
<p>
</div>
+</div>
<% } %>
<%
}
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp Thu Feb 14 12:58:12 2013
@@ -56,7 +56,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="/master-status">HBase Master</a>
+ <a class="brand" href="/master-status"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="/master-status">Home</a></li>
@@ -73,12 +73,9 @@
<div class="container">
<div class="row inner_header">
- <div class="span8">
+ <div class="page-header">
<h1>User Tables</h1>
</div>
- <div class="span4 logo">
- <img src="/static/hbase_logo.png" height="66" width="266" alt="HBase logo"/>
- </div>
</div>
<% HTableDescriptor[] tables = new HBaseAdmin(conf).listTables();
@@ -90,7 +87,7 @@
</tr>
<% for(HTableDescriptor htDesc : tables ) { %>
<tr>
- <td><%= escapeXml(htDesc.getNameAsString()) %></td>
+ <td><a href="/table.jsp?name=<%= escapeXml(htDesc.getNameAsString()) %>"><%= escapeXml(htDesc.getNameAsString()) %></a></td>
<td><%= escapeXml(htDesc.toString()) %></td>
</tr>
<% } %>
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/zk.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/zk.jsp?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/zk.jsp (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/master/zk.jsp Thu Feb 14 12:58:12 2013
@@ -61,7 +61,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="/rs-status">HBase Region Server</a>
+ <a class="brand" href="/master-status"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="/">Home</a></li>
@@ -77,12 +77,9 @@
<div class="container">
<div class="row inner_header">
- <div class="span8">
+ <div class="page-header">
<h1>Zookeeper Dump</h1>
</div>
- <div class="span4 logo">
- <img src="/static/hbase_logo.png" height="66" width="266" alt="HBase logo"/>
- </div>
</div>
<div class="row">
<div class="span12">
Modified: hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap-responsive.css
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap-responsive.css?rev=1446147&r1=1446146&r2=1446147&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap-responsive.css (original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap-responsive.css Thu Feb 14 12:58:12 2013
@@ -1,5 +1,5 @@
/*!
- * Bootstrap Responsive v2.0.4
+ * Bootstrap Responsive v2.2.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
@@ -8,6 +8,10 @@
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
+@-ms-viewport {
+ width: device-width;
+}
+
.clearfix {
*zoom: 1;
}
@@ -15,6 +19,7 @@
.clearfix:before,
.clearfix:after {
display: table;
+ line-height: 0;
content: "";
}
@@ -33,10 +38,9 @@
.input-block-level {
display: block;
width: 100%;
- min-height: 28px;
+ min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
box-sizing: border-box;
}
@@ -57,155 +61,49 @@
display: none !important;
}
-@media (max-width: 767px) {
- .visible-phone {
- display: inherit !important;
- }
- .hidden-phone {
- display: none !important;
- }
- .hidden-desktop {
- display: inherit !important;
- }
- .visible-desktop {
- display: none !important;
- }
+.visible-desktop {
+ display: inherit !important;
}
@media (min-width: 768px) and (max-width: 979px) {
- .visible-tablet {
- display: inherit !important;
- }
- .hidden-tablet {
- display: none !important;
- }
.hidden-desktop {
display: inherit !important;
}
.visible-desktop {
display: none !important ;
}
-}
-
-@media (max-width: 480px) {
- .nav-collapse {
- -webkit-transform: translate3d(0, 0, 0);
- }
- .page-header h1 small {
- display: block;
- line-height: 18px;
- }
- input[type="checkbox"],
- input[type="radio"] {
- border: 1px solid #ccc;
- }
- .form-horizontal .control-group > label {
- float: none;
- width: auto;
- padding-top: 0;
- text-align: left;
- }
- .form-horizontal .controls {
- margin-left: 0;
- }
- .form-horizontal .control-list {
- padding-top: 0;
- }
- .form-horizontal .form-actions {
- padding-right: 10px;
- padding-left: 10px;
- }
- .modal {
- position: absolute;
- top: 10px;
- right: 10px;
- left: 10px;
- width: auto;
- margin: 0;
- }
- .modal.fade.in {
- top: auto;
- }
- .modal-header .close {
- padding: 10px;
- margin: -10px;
+ .visible-tablet {
+ display: inherit !important;
}
- .carousel-caption {
- position: static;
+ .hidden-tablet {
+ display: none !important;
}
}
@media (max-width: 767px) {
- body {
- padding-right: 20px;
- padding-left: 20px;
- }
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- margin-right: -20px;
- margin-left: -20px;
- }
- .container-fluid {
- padding: 0;
- }
- .dl-horizontal dt {
- float: none;
- width: auto;
- clear: none;
- text-align: left;
- }
- .dl-horizontal dd {
- margin-left: 0;
- }
- .container {
- width: auto;
- }
- .row-fluid {
- width: 100%;
- }
- .row,
- .thumbnails {
- margin-left: 0;
+ .hidden-desktop {
+ display: inherit !important;
}
- [class*="span"],
- .row-fluid [class*="span"] {
- display: block;
- float: none;
- width: auto;
- margin-left: 0;
+ .visible-desktop {
+ display: none !important;
}
- .input-large,
- .input-xlarge,
- .input-xxlarge,
- input[class*="span"],
- select[class*="span"],
- textarea[class*="span"],
- .uneditable-input {
- display: block;
- width: 100%;
- min-height: 28px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing: border-box;
+ .visible-phone {
+ display: inherit !important;
}
- .input-prepend input,
- .input-append input,
- .input-prepend input[class*="span"],
- .input-append input[class*="span"] {
- display: inline-block;
- width: auto;
+ .hidden-phone {
+ display: none !important;
}
}
-@media (min-width: 768px) and (max-width: 979px) {
+@media (min-width: 1200px) {
.row {
- margin-left: -20px;
+ margin-left: -30px;
*zoom: 1;
}
.row:before,
.row:after {
display: table;
+ line-height: 0;
content: "";
}
.row:after {
@@ -213,84 +111,86 @@
}
[class*="span"] {
float: left;
- margin-left: 20px;
+ min-height: 1px;
+ margin-left: 30px;
}
.container,
+ .navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
- width: 724px;
+ width: 1170px;
}
.span12 {
- width: 724px;
+ width: 1170px;
}
.span11 {
- width: 662px;
+ width: 1070px;
}
.span10 {
- width: 600px;
+ width: 970px;
}
.span9 {
- width: 538px;
+ width: 870px;
}
.span8 {
- width: 476px;
+ width: 770px;
}
.span7 {
- width: 414px;
+ width: 670px;
}
.span6 {
- width: 352px;
+ width: 570px;
}
.span5 {
- width: 290px;
+ width: 470px;
}
.span4 {
- width: 228px;
+ width: 370px;
}
.span3 {
- width: 166px;
+ width: 270px;
}
.span2 {
- width: 104px;
+ width: 170px;
}
.span1 {
- width: 42px;
+ width: 70px;
}
.offset12 {
- margin-left: 764px;
+ margin-left: 1230px;
}
.offset11 {
- margin-left: 702px;
+ margin-left: 1130px;
}
.offset10 {
- margin-left: 640px;
+ margin-left: 1030px;
}
.offset9 {
- margin-left: 578px;
+ margin-left: 930px;
}
.offset8 {
- margin-left: 516px;
+ margin-left: 830px;
}
.offset7 {
- margin-left: 454px;
+ margin-left: 730px;
}
.offset6 {
- margin-left: 392px;
+ margin-left: 630px;
}
.offset5 {
- margin-left: 330px;
+ margin-left: 530px;
}
.offset4 {
- margin-left: 268px;
+ margin-left: 430px;
}
.offset3 {
- margin-left: 206px;
+ margin-left: 330px;
}
.offset2 {
- margin-left: 144px;
+ margin-left: 230px;
}
.offset1 {
- margin-left: 82px;
+ margin-left: 130px;
}
.row-fluid {
width: 100%;
@@ -299,6 +199,7 @@
.row-fluid:before,
.row-fluid:after {
display: table;
+ line-height: 0;
content: "";
}
.row-fluid:after {
@@ -308,140 +209,251 @@
display: block;
float: left;
width: 100%;
- min-height: 28px;
- margin-left: 2.762430939%;
- *margin-left: 2.709239449638298%;
+ min-height: 30px;
+ margin-left: 2.564102564102564%;
+ *margin-left: 2.5109110747408616%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
box-sizing: border-box;
}
.row-fluid [class*="span"]:first-child {
margin-left: 0;
}
+ .row-fluid .controls-row [class*="span"] + [class*="span"] {
+ margin-left: 2.564102564102564%;
+ }
.row-fluid .span12 {
- width: 99.999999993%;
- *width: 99.9468085036383%;
+ width: 100%;
+ *width: 99.94680851063829%;
}
.row-fluid .span11 {
- width: 91.436464082%;
- *width: 91.38327259263829%;
+ width: 91.45299145299145%;
+ *width: 91.39979996362975%;
}
.row-fluid .span10 {
- width: 82.87292817100001%;
- *width: 82.8197366816383%;
+ width: 82.90598290598291%;
+ *width: 82.8527914166212%;
}
.row-fluid .span9 {
- width: 74.30939226%;
- *width: 74.25620077063829%;
+ width: 74.35897435897436%;
+ *width: 74.30578286961266%;
}
.row-fluid .span8 {
- width: 65.74585634900001%;
- *width: 65.6926648596383%;
+ width: 65.81196581196582%;
+ *width: 65.75877432260411%;
}
.row-fluid .span7 {
- width: 57.182320438000005%;
- *width: 57.129128948638304%;
+ width: 57.26495726495726%;
+ *width: 57.21176577559556%;
}
.row-fluid .span6 {
- width: 48.618784527%;
- *width: 48.5655930376383%;
+ width: 48.717948717948715%;
+ *width: 48.664757228587014%;
}
.row-fluid .span5 {
- width: 40.055248616%;
- *width: 40.0020571266383%;
+ width: 40.17094017094017%;
+ *width: 40.11774868157847%;
}
.row-fluid .span4 {
- width: 31.491712705%;
- *width: 31.4385212156383%;
+ width: 31.623931623931625%;
+ *width: 31.570740134569924%;
}
.row-fluid .span3 {
- width: 22.928176794%;
- *width: 22.874985304638297%;
+ width: 23.076923076923077%;
+ *width: 23.023731587561375%;
}
.row-fluid .span2 {
- width: 14.364640883%;
- *width: 14.311449393638298%;
+ width: 14.52991452991453%;
+ *width: 14.476723040552828%;
}
.row-fluid .span1 {
- width: 5.801104972%;
- *width: 5.747913482638298%;
+ width: 5.982905982905983%;
+ *width: 5.929714493544281%;
+ }
+ .row-fluid .offset12 {
+ margin-left: 105.12820512820512%;
+ *margin-left: 105.02182214948171%;
+ }
+ .row-fluid .offset12:first-child {
+ margin-left: 102.56410256410257%;
+ *margin-left: 102.45771958537915%;
+ }
+ .row-fluid .offset11 {
+ margin-left: 96.58119658119658%;
+ *margin-left: 96.47481360247316%;
+ }
+ .row-fluid .offset11:first-child {
+ margin-left: 94.01709401709402%;
+ *margin-left: 93.91071103837061%;
+ }
+ .row-fluid .offset10 {
+ margin-left: 88.03418803418803%;
+ *margin-left: 87.92780505546462%;
+ }
+ .row-fluid .offset10:first-child {
+ margin-left: 85.47008547008548%;
+ *margin-left: 85.36370249136206%;
+ }
+ .row-fluid .offset9 {
+ margin-left: 79.48717948717949%;
+ *margin-left: 79.38079650845607%;
+ }
+ .row-fluid .offset9:first-child {
+ margin-left: 76.92307692307693%;
+ *margin-left: 76.81669394435352%;
+ }
+ .row-fluid .offset8 {
+ margin-left: 70.94017094017094%;
+ *margin-left: 70.83378796144753%;
+ }
+ .row-fluid .offset8:first-child {
+ margin-left: 68.37606837606839%;
+ *margin-left: 68.26968539734497%;
+ }
+ .row-fluid .offset7 {
+ margin-left: 62.393162393162385%;
+ *margin-left: 62.28677941443899%;
+ }
+ .row-fluid .offset7:first-child {
+ margin-left: 59.82905982905982%;
+ *margin-left: 59.72267685033642%;
+ }
+ .row-fluid .offset6 {
+ margin-left: 53.84615384615384%;
+ *margin-left: 53.739770867430444%;
+ }
+ .row-fluid .offset6:first-child {
+ margin-left: 51.28205128205128%;
+ *margin-left: 51.175668303327875%;
+ }
+ .row-fluid .offset5 {
+ margin-left: 45.299145299145295%;
+ *margin-left: 45.1927623204219%;
+ }
+ .row-fluid .offset5:first-child {
+ margin-left: 42.73504273504273%;
+ *margin-left: 42.62865975631933%;
+ }
+ .row-fluid .offset4 {
+ margin-left: 36.75213675213675%;
+ *margin-left: 36.645753773413354%;
+ }
+ .row-fluid .offset4:first-child {
+ margin-left: 34.18803418803419%;
+ *margin-left: 34.081651209310785%;
+ }
+ .row-fluid .offset3 {
+ margin-left: 28.205128205128204%;
+ *margin-left: 28.0987452264048%;
+ }
+ .row-fluid .offset3:first-child {
+ margin-left: 25.641025641025642%;
+ *margin-left: 25.53464266230224%;
+ }
+ .row-fluid .offset2 {
+ margin-left: 19.65811965811966%;
+ *margin-left: 19.551736679396257%;
+ }
+ .row-fluid .offset2:first-child {
+ margin-left: 17.094017094017094%;
+ *margin-left: 16.98763411529369%;
+ }
+ .row-fluid .offset1 {
+ margin-left: 11.11111111111111%;
+ *margin-left: 11.004728132387708%;
+ }
+ .row-fluid .offset1:first-child {
+ margin-left: 8.547008547008547%;
+ *margin-left: 8.440625568285142%;
}
input,
textarea,
.uneditable-input {
margin-left: 0;
}
+ .controls-row [class*="span"] + [class*="span"] {
+ margin-left: 30px;
+ }
input.span12,
textarea.span12,
.uneditable-input.span12 {
- width: 714px;
+ width: 1156px;
}
input.span11,
textarea.span11,
.uneditable-input.span11 {
- width: 652px;
+ width: 1056px;
}
input.span10,
textarea.span10,
.uneditable-input.span10 {
- width: 590px;
+ width: 956px;
}
input.span9,
textarea.span9,
.uneditable-input.span9 {
- width: 528px;
+ width: 856px;
}
input.span8,
textarea.span8,
.uneditable-input.span8 {
- width: 466px;
+ width: 756px;
}
input.span7,
textarea.span7,
.uneditable-input.span7 {
- width: 404px;
+ width: 656px;
}
input.span6,
textarea.span6,
.uneditable-input.span6 {
- width: 342px;
+ width: 556px;
}
input.span5,
textarea.span5,
.uneditable-input.span5 {
- width: 280px;
+ width: 456px;
}
input.span4,
textarea.span4,
.uneditable-input.span4 {
- width: 218px;
+ width: 356px;
}
input.span3,
textarea.span3,
.uneditable-input.span3 {
- width: 156px;
+ width: 256px;
}
input.span2,
textarea.span2,
.uneditable-input.span2 {
- width: 94px;
+ width: 156px;
}
input.span1,
textarea.span1,
.uneditable-input.span1 {
- width: 32px;
+ width: 56px;
+ }
+ .thumbnails {
+ margin-left: -30px;
+ }
+ .thumbnails > li {
+ margin-left: 30px;
+ }
+ .row-fluid .thumbnails {
+ margin-left: 0;
}
}
-@media (min-width: 1200px) {
+@media (min-width: 768px) and (max-width: 979px) {
.row {
- margin-left: -30px;
+ margin-left: -20px;
*zoom: 1;
}
.row:before,
.row:after {
display: table;
+ line-height: 0;
content: "";
}
.row:after {
@@ -449,84 +461,86 @@
}
[class*="span"] {
float: left;
- margin-left: 30px;
+ min-height: 1px;
+ margin-left: 20px;
}
.container,
+ .navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
- width: 1170px;
+ width: 724px;
}
.span12 {
- width: 1170px;
+ width: 724px;
}
.span11 {
- width: 1070px;
+ width: 662px;
}
.span10 {
- width: 970px;
+ width: 600px;
}
.span9 {
- width: 870px;
+ width: 538px;
}
.span8 {
- width: 770px;
+ width: 476px;
}
.span7 {
- width: 670px;
+ width: 414px;
}
.span6 {
- width: 570px;
+ width: 352px;
}
.span5 {
- width: 470px;
+ width: 290px;
}
.span4 {
- width: 370px;
+ width: 228px;
}
.span3 {
- width: 270px;
+ width: 166px;
}
.span2 {
- width: 170px;
+ width: 104px;
}
.span1 {
- width: 70px;
+ width: 42px;
}
.offset12 {
- margin-left: 1230px;
+ margin-left: 764px;
}
.offset11 {
- margin-left: 1130px;
+ margin-left: 702px;
}
.offset10 {
- margin-left: 1030px;
+ margin-left: 640px;
}
.offset9 {
- margin-left: 930px;
+ margin-left: 578px;
}
.offset8 {
- margin-left: 830px;
+ margin-left: 516px;
}
.offset7 {
- margin-left: 730px;
+ margin-left: 454px;
}
.offset6 {
- margin-left: 630px;
+ margin-left: 392px;
}
.offset5 {
- margin-left: 530px;
+ margin-left: 330px;
}
.offset4 {
- margin-left: 430px;
+ margin-left: 268px;
}
.offset3 {
- margin-left: 330px;
+ margin-left: 206px;
}
.offset2 {
- margin-left: 230px;
+ margin-left: 144px;
}
.offset1 {
- margin-left: 130px;
+ margin-left: 82px;
}
.row-fluid {
width: 100%;
@@ -535,6 +549,7 @@
.row-fluid:before,
.row-fluid:after {
display: table;
+ line-height: 0;
content: "";
}
.row-fluid:after {
@@ -544,139 +559,381 @@
display: block;
float: left;
width: 100%;
- min-height: 28px;
- margin-left: 2.564102564%;
- *margin-left: 2.510911074638298%;
+ min-height: 30px;
+ margin-left: 2.7624309392265194%;
+ *margin-left: 2.709239449864817%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
box-sizing: border-box;
}
.row-fluid [class*="span"]:first-child {
margin-left: 0;
}
+ .row-fluid .controls-row [class*="span"] + [class*="span"] {
+ margin-left: 2.7624309392265194%;
+ }
.row-fluid .span12 {
width: 100%;
*width: 99.94680851063829%;
}
.row-fluid .span11 {
- width: 91.45299145300001%;
- *width: 91.3997999636383%;
+ width: 91.43646408839778%;
+ *width: 91.38327259903608%;
}
.row-fluid .span10 {
- width: 82.905982906%;
- *width: 82.8527914166383%;
+ width: 82.87292817679558%;
+ *width: 82.81973668743387%;
}
.row-fluid .span9 {
- width: 74.358974359%;
- *width: 74.30578286963829%;
+ width: 74.30939226519337%;
+ *width: 74.25620077583166%;
}
.row-fluid .span8 {
- width: 65.81196581200001%;
- *width: 65.7587743226383%;
+ width: 65.74585635359117%;
+ *width: 65.69266486422946%;
}
.row-fluid .span7 {
- width: 57.264957265%;
- *width: 57.2117657756383%;
+ width: 57.18232044198895%;
+ *width: 57.12912895262725%;
}
.row-fluid .span6 {
- width: 48.717948718%;
- *width: 48.6647572286383%;
+ width: 48.61878453038674%;
+ *width: 48.56559304102504%;
}
.row-fluid .span5 {
- width: 40.170940171000005%;
- *width: 40.117748681638304%;
+ width: 40.05524861878453%;
+ *width: 40.00205712942283%;
}
.row-fluid .span4 {
- width: 31.623931624%;
- *width: 31.5707401346383%;
+ width: 31.491712707182323%;
+ *width: 31.43852121782062%;
}
.row-fluid .span3 {
- width: 23.076923077%;
- *width: 23.0237315876383%;
+ width: 22.92817679558011%;
+ *width: 22.87498530621841%;
}
.row-fluid .span2 {
- width: 14.529914530000001%;
- *width: 14.4767230406383%;
+ width: 14.3646408839779%;
+ *width: 14.311449394616199%;
}
.row-fluid .span1 {
- width: 5.982905983%;
- *width: 5.929714493638298%;
+ width: 5.801104972375691%;
+ *width: 5.747913483013988%;
+ }
+ .row-fluid .offset12 {
+ margin-left: 105.52486187845304%;
+ *margin-left: 105.41847889972962%;
+ }
+ .row-fluid .offset12:first-child {
+ margin-left: 102.76243093922652%;
+ *margin-left: 102.6560479605031%;
+ }
+ .row-fluid .offset11 {
+ margin-left: 96.96132596685082%;
+ *margin-left: 96.8549429881274%;
+ }
+ .row-fluid .offset11:first-child {
+ margin-left: 94.1988950276243%;
+ *margin-left: 94.09251204890089%;
+ }
+ .row-fluid .offset10 {
+ margin-left: 88.39779005524862%;
+ *margin-left: 88.2914070765252%;
+ }
+ .row-fluid .offset10:first-child {
+ margin-left: 85.6353591160221%;
+ *margin-left: 85.52897613729868%;
+ }
+ .row-fluid .offset9 {
+ margin-left: 79.8342541436464%;
+ *margin-left: 79.72787116492299%;
+ }
+ .row-fluid .offset9:first-child {
+ margin-left: 77.07182320441989%;
+ *margin-left: 76.96544022569647%;
+ }
+ .row-fluid .offset8 {
+ margin-left: 71.2707182320442%;
+ *margin-left: 71.16433525332079%;
+ }
+ .row-fluid .offset8:first-child {
+ margin-left: 68.50828729281768%;
+ *margin-left: 68.40190431409427%;
+ }
+ .row-fluid .offset7 {
+ margin-left: 62.70718232044199%;
+ *margin-left: 62.600799341718584%;
+ }
+ .row-fluid .offset7:first-child {
+ margin-left: 59.94475138121547%;
+ *margin-left: 59.838368402492065%;
+ }
+ .row-fluid .offset6 {
+ margin-left: 54.14364640883978%;
+ *margin-left: 54.037263430116376%;
+ }
+ .row-fluid .offset6:first-child {
+ margin-left: 51.38121546961326%;
+ *margin-left: 51.27483249088986%;
+ }
+ .row-fluid .offset5 {
+ margin-left: 45.58011049723757%;
+ *margin-left: 45.47372751851417%;
+ }
+ .row-fluid .offset5:first-child {
+ margin-left: 42.81767955801105%;
+ *margin-left: 42.71129657928765%;
+ }
+ .row-fluid .offset4 {
+ margin-left: 37.01657458563536%;
+ *margin-left: 36.91019160691196%;
+ }
+ .row-fluid .offset4:first-child {
+ margin-left: 34.25414364640884%;
+ *margin-left: 34.14776066768544%;
+ }
+ .row-fluid .offset3 {
+ margin-left: 28.45303867403315%;
+ *margin-left: 28.346655695309746%;
+ }
+ .row-fluid .offset3:first-child {
+ margin-left: 25.69060773480663%;
+ *margin-left: 25.584224756083227%;
+ }
+ .row-fluid .offset2 {
+ margin-left: 19.88950276243094%;
+ *margin-left: 19.783119783707537%;
+ }
+ .row-fluid .offset2:first-child {
+ margin-left: 17.12707182320442%;
+ *margin-left: 17.02068884448102%;
+ }
+ .row-fluid .offset1 {
+ margin-left: 11.32596685082873%;
+ *margin-left: 11.219583872105325%;
+ }
+ .row-fluid .offset1:first-child {
+ margin-left: 8.56353591160221%;
+ *margin-left: 8.457152932878806%;
}
input,
textarea,
.uneditable-input {
margin-left: 0;
}
+ .controls-row [class*="span"] + [class*="span"] {
+ margin-left: 20px;
+ }
input.span12,
textarea.span12,
.uneditable-input.span12 {
- width: 1160px;
+ width: 710px;
}
input.span11,
textarea.span11,
.uneditable-input.span11 {
- width: 1060px;
+ width: 648px;
}
input.span10,
textarea.span10,
.uneditable-input.span10 {
- width: 960px;
+ width: 586px;
}
input.span9,
textarea.span9,
.uneditable-input.span9 {
- width: 860px;
+ width: 524px;
}
input.span8,
textarea.span8,
.uneditable-input.span8 {
- width: 760px;
+ width: 462px;
}
input.span7,
textarea.span7,
.uneditable-input.span7 {
- width: 660px;
+ width: 400px;
}
input.span6,
textarea.span6,
.uneditable-input.span6 {
- width: 560px;
+ width: 338px;
}
input.span5,
textarea.span5,
.uneditable-input.span5 {
- width: 460px;
+ width: 276px;
}
input.span4,
textarea.span4,
.uneditable-input.span4 {
- width: 360px;
+ width: 214px;
}
input.span3,
textarea.span3,
.uneditable-input.span3 {
- width: 260px;
+ width: 152px;
}
input.span2,
textarea.span2,
.uneditable-input.span2 {
- width: 160px;
+ width: 90px;
}
input.span1,
textarea.span1,
.uneditable-input.span1 {
- width: 60px;
+ width: 28px;
+ }
+}
+
+@media (max-width: 767px) {
+ body {
+ padding-right: 20px;
+ padding-left: 20px;
+ }
+ .navbar-fixed-top,
+ .navbar-fixed-bottom,
+ .navbar-static-top {
+ margin-right: -20px;
+ margin-left: -20px;
+ }
+ .container-fluid {
+ padding: 0;
+ }
+ .dl-horizontal dt {
+ float: none;
+ width: auto;
+ clear: none;
+ text-align: left;
}
+ .dl-horizontal dd {
+ margin-left: 0;
+ }
+ .container {
+ width: auto;
+ }
+ .row-fluid {
+ width: 100%;
+ }
+ .row,
.thumbnails {
- margin-left: -30px;
+ margin-left: 0;
}
.thumbnails > li {
- margin-left: 30px;
+ float: none;
+ margin-left: 0;
}
- .row-fluid .thumbnails {
+ [class*="span"],
+ .uneditable-input[class*="span"],
+ .row-fluid [class*="span"] {
+ display: block;
+ float: none;
+ width: 100%;
+ margin-left: 0;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .span12,
+ .row-fluid .span12 {
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .row-fluid [class*="offset"]:first-child {
+ margin-left: 0;
+ }
+ .input-large,
+ .input-xlarge,
+ .input-xxlarge,
+ input[class*="span"],
+ select[class*="span"],
+ textarea[class*="span"],
+ .uneditable-input {
+ display: block;
+ width: 100%;
+ min-height: 30px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .input-prepend input,
+ .input-append input,
+ .input-prepend input[class*="span"],
+ .input-append input[class*="span"] {
+ display: inline-block;
+ width: auto;
+ }
+ .controls-row [class*="span"] + [class*="span"] {
+ margin-left: 0;
+ }
+ .modal {
+ position: fixed;
+ top: 20px;
+ right: 20px;
+ left: 20px;
+ width: auto;
+ margin: 0;
+ }
+ .modal.fade {
+ top: -100px;
+ }
+ .modal.fade.in {
+ top: 20px;
+ }
+}
+
+@media (max-width: 480px) {
+ .nav-collapse {
+ -webkit-transform: translate3d(0, 0, 0);
+ }
+ .page-header h1 small {
+ display: block;
+ line-height: 20px;
+ }
+ input[type="checkbox"],
+ input[type="radio"] {
+ border: 1px solid #ccc;
+ }
+ .form-horizontal .control-label {
+ float: none;
+ width: auto;
+ padding-top: 0;
+ text-align: left;
+ }
+ .form-horizontal .controls {
margin-left: 0;
}
+ .form-horizontal .control-list {
+ padding-top: 0;
+ }
+ .form-horizontal .form-actions {
+ padding-right: 10px;
+ padding-left: 10px;
+ }
+ .media .pull-left,
+ .media .pull-right {
+ display: block;
+ float: none;
+ margin-bottom: 10px;
+ }
+ .media-object {
+ margin-right: 0;
+ margin-left: 0;
+ }
+ .modal {
+ top: 10px;
+ right: 10px;
+ left: 10px;
+ }
+ .modal-header .close {
+ padding: 10px;
+ margin: -10px;
+ }
+ .carousel-caption {
+ position: static;
+ }
}
@media (max-width: 979px) {
@@ -688,10 +945,10 @@
position: static;
}
.navbar-fixed-top {
- margin-bottom: 18px;
+ margin-bottom: 20px;
}
.navbar-fixed-bottom {
- margin-top: 18px;
+ margin-top: 20px;
}
.navbar-fixed-top .navbar-inner,
.navbar-fixed-bottom .navbar-inner {
@@ -711,7 +968,7 @@
}
.nav-collapse .nav {
float: none;
- margin: 0 0 9px;
+ margin: 0 0 10px;
}
.nav-collapse .nav > li {
float: none;
@@ -723,14 +980,14 @@
display: none;
}
.nav-collapse .nav .nav-header {
- color: #999999;
+ color: #777777;
text-shadow: none;
}
.nav-collapse .nav > li > a,
.nav-collapse .dropdown-menu a {
- padding: 6px 15px;
+ padding: 9px 15px;
font-weight: bold;
- color: #999999;
+ color: #777777;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
@@ -747,7 +1004,15 @@
}
.nav-collapse .nav > li > a:hover,
.nav-collapse .dropdown-menu a:hover {
- background-color: #222222;
+ background-color: #f2f2f2;
+ }
+ .navbar-inverse .nav-collapse .nav > li > a,
+ .navbar-inverse .nav-collapse .dropdown-menu a {
+ color: #999999;
+ }
+ .navbar-inverse .nav-collapse .nav > li > a:hover,
+ .navbar-inverse .nav-collapse .dropdown-menu a:hover {
+ background-color: #111111;
}
.nav-collapse.in .btn-group {
padding: 0;
@@ -757,7 +1022,7 @@
position: static;
top: auto;
left: auto;
- display: block;
+ display: none;
float: none;
max-width: none;
padding: 0;
@@ -771,6 +1036,9 @@
-moz-box-shadow: none;
box-shadow: none;
}
+ .nav-collapse .open > .dropdown-menu {
+ display: block;
+ }
.nav-collapse .dropdown-menu:before,
.nav-collapse .dropdown-menu:after {
display: none;
@@ -778,17 +1046,26 @@
.nav-collapse .dropdown-menu .divider {
display: none;
}
+ .nav-collapse .nav > li > .dropdown-menu:before,
+ .nav-collapse .nav > li > .dropdown-menu:after {
+ display: none;
+ }
.nav-collapse .navbar-form,
.nav-collapse .navbar-search {
float: none;
- padding: 9px 15px;
- margin: 9px 0;
- border-top: 1px solid #222222;
- border-bottom: 1px solid #222222;
+ padding: 10px 15px;
+ margin: 10px 0;
+ border-top: 1px solid #f2f2f2;
+ border-bottom: 1px solid #f2f2f2;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
}
+ .navbar-inverse .nav-collapse .navbar-form,
+ .navbar-inverse .nav-collapse .navbar-search {
+ border-top-color: #111111;
+ border-bottom-color: #111111;
+ }
.navbar .nav-collapse .nav.pull-right {
float: none;
margin-left: 0;