http://git-wip-us.apache.org/repos/asf/hbase-site/blob/6674e3ab/devapidocs/src-html/org/apache/hadoop/hbase/MetaTableAccessor.DefaultVisitorBase.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/MetaTableAccessor.DefaultVisitorBase.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/MetaTableAccessor.DefaultVisitorBase.html
index ad601c4..53e455f 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/MetaTableAccessor.DefaultVisitorBase.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/MetaTableAccessor.DefaultVisitorBase.html
@@ -1117,1183 +1117,1186 @@
 <span class="sourceLineNo">1109</span>  @Nullable<a name="line.1109"></a>
 <span class="sourceLineNo">1110</span>  public static TableState 
getTableState(Connection conn, TableName tableName)<a name="line.1110"></a>
 <span class="sourceLineNo">1111</span>      throws IOException {<a 
name="line.1111"></a>
-<span class="sourceLineNo">1112</span>    Table metaHTable = 
getMetaHTable(conn);<a name="line.1112"></a>
-<span class="sourceLineNo">1113</span>    Get get = new 
Get(tableName.getName()).addColumn(getTableFamily(), getTableStateColumn());<a 
name="line.1113"></a>
-<span class="sourceLineNo">1114</span>    long time = 
EnvironmentEdgeManager.currentTime();<a name="line.1114"></a>
-<span class="sourceLineNo">1115</span>    get.setTimeRange(0, time);<a 
name="line.1115"></a>
-<span class="sourceLineNo">1116</span>    Result result =<a 
name="line.1116"></a>
-<span class="sourceLineNo">1117</span>        metaHTable.get(get);<a 
name="line.1117"></a>
-<span class="sourceLineNo">1118</span>    return getTableState(result);<a 
name="line.1118"></a>
-<span class="sourceLineNo">1119</span>  }<a name="line.1119"></a>
-<span class="sourceLineNo">1120</span><a name="line.1120"></a>
-<span class="sourceLineNo">1121</span>  /**<a name="line.1121"></a>
-<span class="sourceLineNo">1122</span>   * Fetch table states from META 
table<a name="line.1122"></a>
-<span class="sourceLineNo">1123</span>   * @param conn connection to use<a 
name="line.1123"></a>
-<span class="sourceLineNo">1124</span>   * @return map {tableName -&amp;gt; 
state}<a name="line.1124"></a>
-<span class="sourceLineNo">1125</span>   * @throws IOException<a 
name="line.1125"></a>
-<span class="sourceLineNo">1126</span>   */<a name="line.1126"></a>
-<span class="sourceLineNo">1127</span>  public static Map&lt;TableName, 
TableState&gt; getTableStates(Connection conn)<a name="line.1127"></a>
-<span class="sourceLineNo">1128</span>      throws IOException {<a 
name="line.1128"></a>
-<span class="sourceLineNo">1129</span>    final Map&lt;TableName, 
TableState&gt; states = new LinkedHashMap&lt;&gt;();<a name="line.1129"></a>
-<span class="sourceLineNo">1130</span>    Visitor collector = new Visitor() 
{<a name="line.1130"></a>
-<span class="sourceLineNo">1131</span>      @Override<a name="line.1131"></a>
-<span class="sourceLineNo">1132</span>      public boolean visit(Result r) 
throws IOException {<a name="line.1132"></a>
-<span class="sourceLineNo">1133</span>        TableState state = 
getTableState(r);<a name="line.1133"></a>
-<span class="sourceLineNo">1134</span>        if (state != null)<a 
name="line.1134"></a>
-<span class="sourceLineNo">1135</span>          
states.put(state.getTableName(), state);<a name="line.1135"></a>
-<span class="sourceLineNo">1136</span>        return true;<a 
name="line.1136"></a>
-<span class="sourceLineNo">1137</span>      }<a name="line.1137"></a>
-<span class="sourceLineNo">1138</span>    };<a name="line.1138"></a>
-<span class="sourceLineNo">1139</span>    fullScanTables(conn, collector);<a 
name="line.1139"></a>
-<span class="sourceLineNo">1140</span>    return states;<a 
name="line.1140"></a>
-<span class="sourceLineNo">1141</span>  }<a name="line.1141"></a>
-<span class="sourceLineNo">1142</span><a name="line.1142"></a>
-<span class="sourceLineNo">1143</span>  /**<a name="line.1143"></a>
-<span class="sourceLineNo">1144</span>   * Updates state in META<a 
name="line.1144"></a>
-<span class="sourceLineNo">1145</span>   * @param conn connection to use<a 
name="line.1145"></a>
-<span class="sourceLineNo">1146</span>   * @param tableName table to look 
for<a name="line.1146"></a>
-<span class="sourceLineNo">1147</span>   * @throws IOException<a 
name="line.1147"></a>
-<span class="sourceLineNo">1148</span>   */<a name="line.1148"></a>
-<span class="sourceLineNo">1149</span>  public static void 
updateTableState(Connection conn, TableName tableName,<a name="line.1149"></a>
-<span class="sourceLineNo">1150</span>      TableState.State actual) throws 
IOException {<a name="line.1150"></a>
-<span class="sourceLineNo">1151</span>    updateTableState(conn, new 
TableState(tableName, actual));<a name="line.1151"></a>
-<span class="sourceLineNo">1152</span>  }<a name="line.1152"></a>
-<span class="sourceLineNo">1153</span><a name="line.1153"></a>
-<span class="sourceLineNo">1154</span>  /**<a name="line.1154"></a>
-<span class="sourceLineNo">1155</span>   * Decode table state from META 
Result.<a name="line.1155"></a>
-<span class="sourceLineNo">1156</span>   * Should contain cell from 
HConstants.TABLE_FAMILY<a name="line.1156"></a>
-<span class="sourceLineNo">1157</span>   * @param r result<a 
name="line.1157"></a>
-<span class="sourceLineNo">1158</span>   * @return null if not found<a 
name="line.1158"></a>
-<span class="sourceLineNo">1159</span>   * @throws IOException<a 
name="line.1159"></a>
-<span class="sourceLineNo">1160</span>   */<a name="line.1160"></a>
-<span class="sourceLineNo">1161</span>  @Nullable<a name="line.1161"></a>
-<span class="sourceLineNo">1162</span>  public static TableState 
getTableState(Result r)<a name="line.1162"></a>
-<span class="sourceLineNo">1163</span>      throws IOException {<a 
name="line.1163"></a>
-<span class="sourceLineNo">1164</span>    Cell cell = 
r.getColumnLatestCell(getTableFamily(), getTableStateColumn());<a 
name="line.1164"></a>
-<span class="sourceLineNo">1165</span>    if (cell == null) return null;<a 
name="line.1165"></a>
-<span class="sourceLineNo">1166</span>    try {<a name="line.1166"></a>
-<span class="sourceLineNo">1167</span>      return 
TableState.parseFrom(TableName.valueOf(r.getRow()),<a name="line.1167"></a>
-<span class="sourceLineNo">1168</span>          
Arrays.copyOfRange(cell.getValueArray(),<a name="line.1168"></a>
-<span class="sourceLineNo">1169</span>          cell.getValueOffset(), 
cell.getValueOffset() + cell.getValueLength()));<a name="line.1169"></a>
-<span class="sourceLineNo">1170</span>    } catch (DeserializationException e) 
{<a name="line.1170"></a>
-<span class="sourceLineNo">1171</span>      throw new IOException(e);<a 
name="line.1171"></a>
-<span class="sourceLineNo">1172</span>    }<a name="line.1172"></a>
-<span class="sourceLineNo">1173</span><a name="line.1173"></a>
-<span class="sourceLineNo">1174</span>  }<a name="line.1174"></a>
-<span class="sourceLineNo">1175</span><a name="line.1175"></a>
-<span class="sourceLineNo">1176</span>  /**<a name="line.1176"></a>
-<span class="sourceLineNo">1177</span>   * Implementations 'visit' a catalog 
table row.<a name="line.1177"></a>
-<span class="sourceLineNo">1178</span>   */<a name="line.1178"></a>
-<span class="sourceLineNo">1179</span>  public interface Visitor {<a 
name="line.1179"></a>
-<span class="sourceLineNo">1180</span>    /**<a name="line.1180"></a>
-<span class="sourceLineNo">1181</span>     * Visit the catalog table row.<a 
name="line.1181"></a>
-<span class="sourceLineNo">1182</span>     * @param r A row from catalog 
table<a name="line.1182"></a>
-<span class="sourceLineNo">1183</span>     * @return True if we are to proceed 
scanning the table, else false if<a name="line.1183"></a>
-<span class="sourceLineNo">1184</span>     * we are to stop now.<a 
name="line.1184"></a>
-<span class="sourceLineNo">1185</span>     */<a name="line.1185"></a>
-<span class="sourceLineNo">1186</span>    boolean visit(final Result r) throws 
IOException;<a name="line.1186"></a>
-<span class="sourceLineNo">1187</span>  }<a name="line.1187"></a>
-<span class="sourceLineNo">1188</span><a name="line.1188"></a>
-<span class="sourceLineNo">1189</span>  /**<a name="line.1189"></a>
-<span class="sourceLineNo">1190</span>   * Implementations 'visit' a catalog 
table row but with close() at the end.<a name="line.1190"></a>
-<span class="sourceLineNo">1191</span>   */<a name="line.1191"></a>
-<span class="sourceLineNo">1192</span>  public interface CloseableVisitor 
extends Visitor, Closeable {<a name="line.1192"></a>
-<span class="sourceLineNo">1193</span>  }<a name="line.1193"></a>
-<span class="sourceLineNo">1194</span><a name="line.1194"></a>
-<span class="sourceLineNo">1195</span>  /**<a name="line.1195"></a>
-<span class="sourceLineNo">1196</span>   * A {@link Visitor} that collects 
content out of passed {@link Result}.<a name="line.1196"></a>
-<span class="sourceLineNo">1197</span>   */<a name="line.1197"></a>
-<span class="sourceLineNo">1198</span>  static abstract class 
CollectingVisitor&lt;T&gt; implements Visitor {<a name="line.1198"></a>
-<span class="sourceLineNo">1199</span>    final List&lt;T&gt; results = new 
ArrayList&lt;&gt;();<a name="line.1199"></a>
-<span class="sourceLineNo">1200</span>    @Override<a name="line.1200"></a>
-<span class="sourceLineNo">1201</span>    public boolean visit(Result r) 
throws IOException {<a name="line.1201"></a>
-<span class="sourceLineNo">1202</span>      if (r ==  null || r.isEmpty()) 
return true;<a name="line.1202"></a>
-<span class="sourceLineNo">1203</span>      add(r);<a name="line.1203"></a>
-<span class="sourceLineNo">1204</span>      return true;<a 
name="line.1204"></a>
-<span class="sourceLineNo">1205</span>    }<a name="line.1205"></a>
-<span class="sourceLineNo">1206</span><a name="line.1206"></a>
-<span class="sourceLineNo">1207</span>    abstract void add(Result r);<a 
name="line.1207"></a>
-<span class="sourceLineNo">1208</span><a name="line.1208"></a>
-<span class="sourceLineNo">1209</span>    /**<a name="line.1209"></a>
-<span class="sourceLineNo">1210</span>     * @return Collected results; wait 
till visits complete to collect all<a name="line.1210"></a>
-<span class="sourceLineNo">1211</span>     * possible results<a 
name="line.1211"></a>
-<span class="sourceLineNo">1212</span>     */<a name="line.1212"></a>
-<span class="sourceLineNo">1213</span>    List&lt;T&gt; getResults() {<a 
name="line.1213"></a>
-<span class="sourceLineNo">1214</span>      return this.results;<a 
name="line.1214"></a>
-<span class="sourceLineNo">1215</span>    }<a name="line.1215"></a>
-<span class="sourceLineNo">1216</span>  }<a name="line.1216"></a>
-<span class="sourceLineNo">1217</span><a name="line.1217"></a>
-<span class="sourceLineNo">1218</span>  /**<a name="line.1218"></a>
-<span class="sourceLineNo">1219</span>   * Collects all returned.<a 
name="line.1219"></a>
-<span class="sourceLineNo">1220</span>   */<a name="line.1220"></a>
-<span class="sourceLineNo">1221</span>  static class CollectAllVisitor extends 
CollectingVisitor&lt;Result&gt; {<a name="line.1221"></a>
-<span class="sourceLineNo">1222</span>    @Override<a name="line.1222"></a>
-<span class="sourceLineNo">1223</span>    void add(Result r) {<a 
name="line.1223"></a>
-<span class="sourceLineNo">1224</span>      this.results.add(r);<a 
name="line.1224"></a>
-<span class="sourceLineNo">1225</span>    }<a name="line.1225"></a>
-<span class="sourceLineNo">1226</span>  }<a name="line.1226"></a>
-<span class="sourceLineNo">1227</span><a name="line.1227"></a>
-<span class="sourceLineNo">1228</span>  /**<a name="line.1228"></a>
-<span class="sourceLineNo">1229</span>   * A Visitor that skips offline 
regions and split parents<a name="line.1229"></a>
-<span class="sourceLineNo">1230</span>   */<a name="line.1230"></a>
-<span class="sourceLineNo">1231</span>  public static abstract class 
DefaultVisitorBase implements Visitor {<a name="line.1231"></a>
-<span class="sourceLineNo">1232</span><a name="line.1232"></a>
-<span class="sourceLineNo">1233</span>    public DefaultVisitorBase() {<a 
name="line.1233"></a>
-<span class="sourceLineNo">1234</span>      super();<a name="line.1234"></a>
-<span class="sourceLineNo">1235</span>    }<a name="line.1235"></a>
-<span class="sourceLineNo">1236</span><a name="line.1236"></a>
-<span class="sourceLineNo">1237</span>    public abstract boolean 
visitInternal(Result rowResult) throws IOException;<a name="line.1237"></a>
-<span class="sourceLineNo">1238</span><a name="line.1238"></a>
-<span class="sourceLineNo">1239</span>    @Override<a name="line.1239"></a>
-<span class="sourceLineNo">1240</span>    public boolean visit(Result 
rowResult) throws IOException {<a name="line.1240"></a>
-<span class="sourceLineNo">1241</span>      RegionInfo info = 
getRegionInfo(rowResult);<a name="line.1241"></a>
-<span class="sourceLineNo">1242</span>      if (info == null) {<a 
name="line.1242"></a>
-<span class="sourceLineNo">1243</span>        return true;<a 
name="line.1243"></a>
-<span class="sourceLineNo">1244</span>      }<a name="line.1244"></a>
-<span class="sourceLineNo">1245</span><a name="line.1245"></a>
-<span class="sourceLineNo">1246</span>      //skip over offline and split 
regions<a name="line.1246"></a>
-<span class="sourceLineNo">1247</span>      if (!(info.isOffline() || 
info.isSplit())) {<a name="line.1247"></a>
-<span class="sourceLineNo">1248</span>        return 
visitInternal(rowResult);<a name="line.1248"></a>
-<span class="sourceLineNo">1249</span>      }<a name="line.1249"></a>
-<span class="sourceLineNo">1250</span>      return true;<a 
name="line.1250"></a>
-<span class="sourceLineNo">1251</span>    }<a name="line.1251"></a>
-<span class="sourceLineNo">1252</span>  }<a name="line.1252"></a>
-<span class="sourceLineNo">1253</span><a name="line.1253"></a>
-<span class="sourceLineNo">1254</span>  /**<a name="line.1254"></a>
-<span class="sourceLineNo">1255</span>   * A Visitor for a table. Provides a 
consistent view of the table's<a name="line.1255"></a>
-<span class="sourceLineNo">1256</span>   * hbase:meta entries during 
concurrent splits (see HBASE-5986 for details). This class<a 
name="line.1256"></a>
-<span class="sourceLineNo">1257</span>   * does not guarantee ordered 
traversal of meta entries, and can block until the<a name="line.1257"></a>
-<span class="sourceLineNo">1258</span>   * hbase:meta entries for daughters 
are available during splits.<a name="line.1258"></a>
-<span class="sourceLineNo">1259</span>   */<a name="line.1259"></a>
-<span class="sourceLineNo">1260</span>  public static abstract class 
TableVisitorBase extends DefaultVisitorBase {<a name="line.1260"></a>
-<span class="sourceLineNo">1261</span>    private TableName tableName;<a 
name="line.1261"></a>
-<span class="sourceLineNo">1262</span><a name="line.1262"></a>
-<span class="sourceLineNo">1263</span>    public TableVisitorBase(TableName 
tableName) {<a name="line.1263"></a>
-<span class="sourceLineNo">1264</span>      super();<a name="line.1264"></a>
-<span class="sourceLineNo">1265</span>      this.tableName = tableName;<a 
name="line.1265"></a>
-<span class="sourceLineNo">1266</span>    }<a name="line.1266"></a>
-<span class="sourceLineNo">1267</span><a name="line.1267"></a>
-<span class="sourceLineNo">1268</span>    @Override<a name="line.1268"></a>
-<span class="sourceLineNo">1269</span>    public final boolean visit(Result 
rowResult) throws IOException {<a name="line.1269"></a>
-<span class="sourceLineNo">1270</span>      RegionInfo info = 
getRegionInfo(rowResult);<a name="line.1270"></a>
-<span class="sourceLineNo">1271</span>      if (info == null) {<a 
name="line.1271"></a>
-<span class="sourceLineNo">1272</span>        return true;<a 
name="line.1272"></a>
-<span class="sourceLineNo">1273</span>      }<a name="line.1273"></a>
-<span class="sourceLineNo">1274</span>      if 
(!(info.getTable().equals(tableName))) {<a name="line.1274"></a>
-<span class="sourceLineNo">1275</span>        return false;<a 
name="line.1275"></a>
+<span class="sourceLineNo">1112</span>    if 
(tableName.equals(TableName.META_TABLE_NAME)) {<a name="line.1112"></a>
+<span class="sourceLineNo">1113</span>      return new TableState(tableName, 
TableState.State.ENABLED);<a name="line.1113"></a>
+<span class="sourceLineNo">1114</span>    }<a name="line.1114"></a>
+<span class="sourceLineNo">1115</span>    Table metaHTable = 
getMetaHTable(conn);<a name="line.1115"></a>
+<span class="sourceLineNo">1116</span>    Get get = new 
Get(tableName.getName()).addColumn(getTableFamily(), getTableStateColumn());<a 
name="line.1116"></a>
+<span class="sourceLineNo">1117</span>    long time = 
EnvironmentEdgeManager.currentTime();<a name="line.1117"></a>
+<span class="sourceLineNo">1118</span>    get.setTimeRange(0, time);<a 
name="line.1118"></a>
+<span class="sourceLineNo">1119</span>    Result result =<a 
name="line.1119"></a>
+<span class="sourceLineNo">1120</span>        metaHTable.get(get);<a 
name="line.1120"></a>
+<span class="sourceLineNo">1121</span>    return getTableState(result);<a 
name="line.1121"></a>
+<span class="sourceLineNo">1122</span>  }<a name="line.1122"></a>
+<span class="sourceLineNo">1123</span><a name="line.1123"></a>
+<span class="sourceLineNo">1124</span>  /**<a name="line.1124"></a>
+<span class="sourceLineNo">1125</span>   * Fetch table states from META 
table<a name="line.1125"></a>
+<span class="sourceLineNo">1126</span>   * @param conn connection to use<a 
name="line.1126"></a>
+<span class="sourceLineNo">1127</span>   * @return map {tableName -&amp;gt; 
state}<a name="line.1127"></a>
+<span class="sourceLineNo">1128</span>   * @throws IOException<a 
name="line.1128"></a>
+<span class="sourceLineNo">1129</span>   */<a name="line.1129"></a>
+<span class="sourceLineNo">1130</span>  public static Map&lt;TableName, 
TableState&gt; getTableStates(Connection conn)<a name="line.1130"></a>
+<span class="sourceLineNo">1131</span>      throws IOException {<a 
name="line.1131"></a>
+<span class="sourceLineNo">1132</span>    final Map&lt;TableName, 
TableState&gt; states = new LinkedHashMap&lt;&gt;();<a name="line.1132"></a>
+<span class="sourceLineNo">1133</span>    Visitor collector = new Visitor() 
{<a name="line.1133"></a>
+<span class="sourceLineNo">1134</span>      @Override<a name="line.1134"></a>
+<span class="sourceLineNo">1135</span>      public boolean visit(Result r) 
throws IOException {<a name="line.1135"></a>
+<span class="sourceLineNo">1136</span>        TableState state = 
getTableState(r);<a name="line.1136"></a>
+<span class="sourceLineNo">1137</span>        if (state != null)<a 
name="line.1137"></a>
+<span class="sourceLineNo">1138</span>          
states.put(state.getTableName(), state);<a name="line.1138"></a>
+<span class="sourceLineNo">1139</span>        return true;<a 
name="line.1139"></a>
+<span class="sourceLineNo">1140</span>      }<a name="line.1140"></a>
+<span class="sourceLineNo">1141</span>    };<a name="line.1141"></a>
+<span class="sourceLineNo">1142</span>    fullScanTables(conn, collector);<a 
name="line.1142"></a>
+<span class="sourceLineNo">1143</span>    return states;<a 
name="line.1143"></a>
+<span class="sourceLineNo">1144</span>  }<a name="line.1144"></a>
+<span class="sourceLineNo">1145</span><a name="line.1145"></a>
+<span class="sourceLineNo">1146</span>  /**<a name="line.1146"></a>
+<span class="sourceLineNo">1147</span>   * Updates state in META<a 
name="line.1147"></a>
+<span class="sourceLineNo">1148</span>   * @param conn connection to use<a 
name="line.1148"></a>
+<span class="sourceLineNo">1149</span>   * @param tableName table to look 
for<a name="line.1149"></a>
+<span class="sourceLineNo">1150</span>   * @throws IOException<a 
name="line.1150"></a>
+<span class="sourceLineNo">1151</span>   */<a name="line.1151"></a>
+<span class="sourceLineNo">1152</span>  public static void 
updateTableState(Connection conn, TableName tableName,<a name="line.1152"></a>
+<span class="sourceLineNo">1153</span>      TableState.State actual) throws 
IOException {<a name="line.1153"></a>
+<span class="sourceLineNo">1154</span>    updateTableState(conn, new 
TableState(tableName, actual));<a name="line.1154"></a>
+<span class="sourceLineNo">1155</span>  }<a name="line.1155"></a>
+<span class="sourceLineNo">1156</span><a name="line.1156"></a>
+<span class="sourceLineNo">1157</span>  /**<a name="line.1157"></a>
+<span class="sourceLineNo">1158</span>   * Decode table state from META 
Result.<a name="line.1158"></a>
+<span class="sourceLineNo">1159</span>   * Should contain cell from 
HConstants.TABLE_FAMILY<a name="line.1159"></a>
+<span class="sourceLineNo">1160</span>   * @param r result<a 
name="line.1160"></a>
+<span class="sourceLineNo">1161</span>   * @return null if not found<a 
name="line.1161"></a>
+<span class="sourceLineNo">1162</span>   * @throws IOException<a 
name="line.1162"></a>
+<span class="sourceLineNo">1163</span>   */<a name="line.1163"></a>
+<span class="sourceLineNo">1164</span>  @Nullable<a name="line.1164"></a>
+<span class="sourceLineNo">1165</span>  public static TableState 
getTableState(Result r)<a name="line.1165"></a>
+<span class="sourceLineNo">1166</span>      throws IOException {<a 
name="line.1166"></a>
+<span class="sourceLineNo">1167</span>    Cell cell = 
r.getColumnLatestCell(getTableFamily(), getTableStateColumn());<a 
name="line.1167"></a>
+<span class="sourceLineNo">1168</span>    if (cell == null) return null;<a 
name="line.1168"></a>
+<span class="sourceLineNo">1169</span>    try {<a name="line.1169"></a>
+<span class="sourceLineNo">1170</span>      return 
TableState.parseFrom(TableName.valueOf(r.getRow()),<a name="line.1170"></a>
+<span class="sourceLineNo">1171</span>          
Arrays.copyOfRange(cell.getValueArray(),<a name="line.1171"></a>
+<span class="sourceLineNo">1172</span>          cell.getValueOffset(), 
cell.getValueOffset() + cell.getValueLength()));<a name="line.1172"></a>
+<span class="sourceLineNo">1173</span>    } catch (DeserializationException e) 
{<a name="line.1173"></a>
+<span class="sourceLineNo">1174</span>      throw new IOException(e);<a 
name="line.1174"></a>
+<span class="sourceLineNo">1175</span>    }<a name="line.1175"></a>
+<span class="sourceLineNo">1176</span><a name="line.1176"></a>
+<span class="sourceLineNo">1177</span>  }<a name="line.1177"></a>
+<span class="sourceLineNo">1178</span><a name="line.1178"></a>
+<span class="sourceLineNo">1179</span>  /**<a name="line.1179"></a>
+<span class="sourceLineNo">1180</span>   * Implementations 'visit' a catalog 
table row.<a name="line.1180"></a>
+<span class="sourceLineNo">1181</span>   */<a name="line.1181"></a>
+<span class="sourceLineNo">1182</span>  public interface Visitor {<a 
name="line.1182"></a>
+<span class="sourceLineNo">1183</span>    /**<a name="line.1183"></a>
+<span class="sourceLineNo">1184</span>     * Visit the catalog table row.<a 
name="line.1184"></a>
+<span class="sourceLineNo">1185</span>     * @param r A row from catalog 
table<a name="line.1185"></a>
+<span class="sourceLineNo">1186</span>     * @return True if we are to proceed 
scanning the table, else false if<a name="line.1186"></a>
+<span class="sourceLineNo">1187</span>     * we are to stop now.<a 
name="line.1187"></a>
+<span class="sourceLineNo">1188</span>     */<a name="line.1188"></a>
+<span class="sourceLineNo">1189</span>    boolean visit(final Result r) throws 
IOException;<a name="line.1189"></a>
+<span class="sourceLineNo">1190</span>  }<a name="line.1190"></a>
+<span class="sourceLineNo">1191</span><a name="line.1191"></a>
+<span class="sourceLineNo">1192</span>  /**<a name="line.1192"></a>
+<span class="sourceLineNo">1193</span>   * Implementations 'visit' a catalog 
table row but with close() at the end.<a name="line.1193"></a>
+<span class="sourceLineNo">1194</span>   */<a name="line.1194"></a>
+<span class="sourceLineNo">1195</span>  public interface CloseableVisitor 
extends Visitor, Closeable {<a name="line.1195"></a>
+<span class="sourceLineNo">1196</span>  }<a name="line.1196"></a>
+<span class="sourceLineNo">1197</span><a name="line.1197"></a>
+<span class="sourceLineNo">1198</span>  /**<a name="line.1198"></a>
+<span class="sourceLineNo">1199</span>   * A {@link Visitor} that collects 
content out of passed {@link Result}.<a name="line.1199"></a>
+<span class="sourceLineNo">1200</span>   */<a name="line.1200"></a>
+<span class="sourceLineNo">1201</span>  static abstract class 
CollectingVisitor&lt;T&gt; implements Visitor {<a name="line.1201"></a>
+<span class="sourceLineNo">1202</span>    final List&lt;T&gt; results = new 
ArrayList&lt;&gt;();<a name="line.1202"></a>
+<span class="sourceLineNo">1203</span>    @Override<a name="line.1203"></a>
+<span class="sourceLineNo">1204</span>    public boolean visit(Result r) 
throws IOException {<a name="line.1204"></a>
+<span class="sourceLineNo">1205</span>      if (r ==  null || r.isEmpty()) 
return true;<a name="line.1205"></a>
+<span class="sourceLineNo">1206</span>      add(r);<a name="line.1206"></a>
+<span class="sourceLineNo">1207</span>      return true;<a 
name="line.1207"></a>
+<span class="sourceLineNo">1208</span>    }<a name="line.1208"></a>
+<span class="sourceLineNo">1209</span><a name="line.1209"></a>
+<span class="sourceLineNo">1210</span>    abstract void add(Result r);<a 
name="line.1210"></a>
+<span class="sourceLineNo">1211</span><a name="line.1211"></a>
+<span class="sourceLineNo">1212</span>    /**<a name="line.1212"></a>
+<span class="sourceLineNo">1213</span>     * @return Collected results; wait 
till visits complete to collect all<a name="line.1213"></a>
+<span class="sourceLineNo">1214</span>     * possible results<a 
name="line.1214"></a>
+<span class="sourceLineNo">1215</span>     */<a name="line.1215"></a>
+<span class="sourceLineNo">1216</span>    List&lt;T&gt; getResults() {<a 
name="line.1216"></a>
+<span class="sourceLineNo">1217</span>      return this.results;<a 
name="line.1217"></a>
+<span class="sourceLineNo">1218</span>    }<a name="line.1218"></a>
+<span class="sourceLineNo">1219</span>  }<a name="line.1219"></a>
+<span class="sourceLineNo">1220</span><a name="line.1220"></a>
+<span class="sourceLineNo">1221</span>  /**<a name="line.1221"></a>
+<span class="sourceLineNo">1222</span>   * Collects all returned.<a 
name="line.1222"></a>
+<span class="sourceLineNo">1223</span>   */<a name="line.1223"></a>
+<span class="sourceLineNo">1224</span>  static class CollectAllVisitor extends 
CollectingVisitor&lt;Result&gt; {<a name="line.1224"></a>
+<span class="sourceLineNo">1225</span>    @Override<a name="line.1225"></a>
+<span class="sourceLineNo">1226</span>    void add(Result r) {<a 
name="line.1226"></a>
+<span class="sourceLineNo">1227</span>      this.results.add(r);<a 
name="line.1227"></a>
+<span class="sourceLineNo">1228</span>    }<a name="line.1228"></a>
+<span class="sourceLineNo">1229</span>  }<a name="line.1229"></a>
+<span class="sourceLineNo">1230</span><a name="line.1230"></a>
+<span class="sourceLineNo">1231</span>  /**<a name="line.1231"></a>
+<span class="sourceLineNo">1232</span>   * A Visitor that skips offline 
regions and split parents<a name="line.1232"></a>
+<span class="sourceLineNo">1233</span>   */<a name="line.1233"></a>
+<span class="sourceLineNo">1234</span>  public static abstract class 
DefaultVisitorBase implements Visitor {<a name="line.1234"></a>
+<span class="sourceLineNo">1235</span><a name="line.1235"></a>
+<span class="sourceLineNo">1236</span>    public DefaultVisitorBase() {<a 
name="line.1236"></a>
+<span class="sourceLineNo">1237</span>      super();<a name="line.1237"></a>
+<span class="sourceLineNo">1238</span>    }<a name="line.1238"></a>
+<span class="sourceLineNo">1239</span><a name="line.1239"></a>
+<span class="sourceLineNo">1240</span>    public abstract boolean 
visitInternal(Result rowResult) throws IOException;<a name="line.1240"></a>
+<span class="sourceLineNo">1241</span><a name="line.1241"></a>
+<span class="sourceLineNo">1242</span>    @Override<a name="line.1242"></a>
+<span class="sourceLineNo">1243</span>    public boolean visit(Result 
rowResult) throws IOException {<a name="line.1243"></a>
+<span class="sourceLineNo">1244</span>      RegionInfo info = 
getRegionInfo(rowResult);<a name="line.1244"></a>
+<span class="sourceLineNo">1245</span>      if (info == null) {<a 
name="line.1245"></a>
+<span class="sourceLineNo">1246</span>        return true;<a 
name="line.1246"></a>
+<span class="sourceLineNo">1247</span>      }<a name="line.1247"></a>
+<span class="sourceLineNo">1248</span><a name="line.1248"></a>
+<span class="sourceLineNo">1249</span>      //skip over offline and split 
regions<a name="line.1249"></a>
+<span class="sourceLineNo">1250</span>      if (!(info.isOffline() || 
info.isSplit())) {<a name="line.1250"></a>
+<span class="sourceLineNo">1251</span>        return 
visitInternal(rowResult);<a name="line.1251"></a>
+<span class="sourceLineNo">1252</span>      }<a name="line.1252"></a>
+<span class="sourceLineNo">1253</span>      return true;<a 
name="line.1253"></a>
+<span class="sourceLineNo">1254</span>    }<a name="line.1254"></a>
+<span class="sourceLineNo">1255</span>  }<a name="line.1255"></a>
+<span class="sourceLineNo">1256</span><a name="line.1256"></a>
+<span class="sourceLineNo">1257</span>  /**<a name="line.1257"></a>
+<span class="sourceLineNo">1258</span>   * A Visitor for a table. Provides a 
consistent view of the table's<a name="line.1258"></a>
+<span class="sourceLineNo">1259</span>   * hbase:meta entries during 
concurrent splits (see HBASE-5986 for details). This class<a 
name="line.1259"></a>
+<span class="sourceLineNo">1260</span>   * does not guarantee ordered 
traversal of meta entries, and can block until the<a name="line.1260"></a>
+<span class="sourceLineNo">1261</span>   * hbase:meta entries for daughters 
are available during splits.<a name="line.1261"></a>
+<span class="sourceLineNo">1262</span>   */<a name="line.1262"></a>
+<span class="sourceLineNo">1263</span>  public static abstract class 
TableVisitorBase extends DefaultVisitorBase {<a name="line.1263"></a>
+<span class="sourceLineNo">1264</span>    private TableName tableName;<a 
name="line.1264"></a>
+<span class="sourceLineNo">1265</span><a name="line.1265"></a>
+<span class="sourceLineNo">1266</span>    public TableVisitorBase(TableName 
tableName) {<a name="line.1266"></a>
+<span class="sourceLineNo">1267</span>      super();<a name="line.1267"></a>
+<span class="sourceLineNo">1268</span>      this.tableName = tableName;<a 
name="line.1268"></a>
+<span class="sourceLineNo">1269</span>    }<a name="line.1269"></a>
+<span class="sourceLineNo">1270</span><a name="line.1270"></a>
+<span class="sourceLineNo">1271</span>    @Override<a name="line.1271"></a>
+<span class="sourceLineNo">1272</span>    public final boolean visit(Result 
rowResult) throws IOException {<a name="line.1272"></a>
+<span class="sourceLineNo">1273</span>      RegionInfo info = 
getRegionInfo(rowResult);<a name="line.1273"></a>
+<span class="sourceLineNo">1274</span>      if (info == null) {<a 
name="line.1274"></a>
+<span class="sourceLineNo">1275</span>        return true;<a 
name="line.1275"></a>
 <span class="sourceLineNo">1276</span>      }<a name="line.1276"></a>
-<span class="sourceLineNo">1277</span>      return super.visit(rowResult);<a 
name="line.1277"></a>
-<span class="sourceLineNo">1278</span>    }<a name="line.1278"></a>
-<span class="sourceLineNo">1279</span>  }<a name="line.1279"></a>
-<span class="sourceLineNo">1280</span><a name="line.1280"></a>
-<span class="sourceLineNo">1281</span>  /**<a name="line.1281"></a>
-<span class="sourceLineNo">1282</span>   * Count regions in 
&lt;code&gt;hbase:meta&lt;/code&gt; for passed table.<a name="line.1282"></a>
-<span class="sourceLineNo">1283</span>   * @param c Configuration object<a 
name="line.1283"></a>
-<span class="sourceLineNo">1284</span>   * @param tableName table name to 
count regions for<a name="line.1284"></a>
-<span class="sourceLineNo">1285</span>   * @return Count or regions in table 
&lt;code&gt;tableName&lt;/code&gt;<a name="line.1285"></a>
-<span class="sourceLineNo">1286</span>   * @throws IOException<a 
name="line.1286"></a>
-<span class="sourceLineNo">1287</span>   */<a name="line.1287"></a>
-<span class="sourceLineNo">1288</span>  public static int getRegionCount(final 
Configuration c, final TableName tableName)<a name="line.1288"></a>
-<span class="sourceLineNo">1289</span>  throws IOException {<a 
name="line.1289"></a>
-<span class="sourceLineNo">1290</span>    try (Connection connection = 
ConnectionFactory.createConnection(c)) {<a name="line.1290"></a>
-<span class="sourceLineNo">1291</span>      return getRegionCount(connection, 
tableName);<a name="line.1291"></a>
-<span class="sourceLineNo">1292</span>    }<a name="line.1292"></a>
-<span class="sourceLineNo">1293</span>  }<a name="line.1293"></a>
-<span class="sourceLineNo">1294</span><a name="line.1294"></a>
-<span class="sourceLineNo">1295</span>  /**<a name="line.1295"></a>
-<span class="sourceLineNo">1296</span>   * Count regions in 
&lt;code&gt;hbase:meta&lt;/code&gt; for passed table.<a name="line.1296"></a>
-<span class="sourceLineNo">1297</span>   * @param connection Connection 
object<a name="line.1297"></a>
-<span class="sourceLineNo">1298</span>   * @param tableName table name to 
count regions for<a name="line.1298"></a>
-<span class="sourceLineNo">1299</span>   * @return Count or regions in table 
&lt;code&gt;tableName&lt;/code&gt;<a name="line.1299"></a>
-<span class="sourceLineNo">1300</span>   * @throws IOException<a 
name="line.1300"></a>
-<span class="sourceLineNo">1301</span>   */<a name="line.1301"></a>
-<span class="sourceLineNo">1302</span>  public static int getRegionCount(final 
Connection connection, final TableName tableName)<a name="line.1302"></a>
-<span class="sourceLineNo">1303</span>  throws IOException {<a 
name="line.1303"></a>
-<span class="sourceLineNo">1304</span>    try (RegionLocator locator = 
connection.getRegionLocator(tableName)) {<a name="line.1304"></a>
-<span class="sourceLineNo">1305</span>      List&lt;HRegionLocation&gt; 
locations = locator.getAllRegionLocations();<a name="line.1305"></a>
-<span class="sourceLineNo">1306</span>      return locations == null? 0: 
locations.size();<a name="line.1306"></a>
-<span class="sourceLineNo">1307</span>    }<a name="line.1307"></a>
-<span class="sourceLineNo">1308</span>  }<a name="line.1308"></a>
-<span class="sourceLineNo">1309</span><a name="line.1309"></a>
-<span class="sourceLineNo">1310</span>  ////////////////////////<a 
name="line.1310"></a>
-<span class="sourceLineNo">1311</span>  // Editing operations //<a 
name="line.1311"></a>
-<span class="sourceLineNo">1312</span>  ////////////////////////<a 
name="line.1312"></a>
-<span class="sourceLineNo">1313</span><a name="line.1313"></a>
-<span class="sourceLineNo">1314</span>  /**<a name="line.1314"></a>
-<span class="sourceLineNo">1315</span>   * Generates and returns a Put 
containing the region into for the catalog table<a name="line.1315"></a>
-<span class="sourceLineNo">1316</span>   */<a name="line.1316"></a>
-<span class="sourceLineNo">1317</span>  public static Put 
makePutFromRegionInfo(RegionInfo regionInfo) throws IOException {<a 
name="line.1317"></a>
-<span class="sourceLineNo">1318</span>    return 
makePutFromRegionInfo(regionInfo, EnvironmentEdgeManager.currentTime());<a 
name="line.1318"></a>
-<span class="sourceLineNo">1319</span>  }<a name="line.1319"></a>
-<span class="sourceLineNo">1320</span><a name="line.1320"></a>
-<span class="sourceLineNo">1321</span>  /**<a name="line.1321"></a>
-<span class="sourceLineNo">1322</span>   * Generates and returns a Put 
containing the region into for the catalog table<a name="line.1322"></a>
-<span class="sourceLineNo">1323</span>   */<a name="line.1323"></a>
-<span class="sourceLineNo">1324</span>  public static Put 
makePutFromRegionInfo(RegionInfo regionInfo, long ts) throws IOException {<a 
name="line.1324"></a>
-<span class="sourceLineNo">1325</span>    Put put = new 
Put(regionInfo.getRegionName(), ts);<a name="line.1325"></a>
-<span class="sourceLineNo">1326</span>    addRegionInfo(put, regionInfo);<a 
name="line.1326"></a>
-<span class="sourceLineNo">1327</span>    return put;<a name="line.1327"></a>
-<span class="sourceLineNo">1328</span>  }<a name="line.1328"></a>
-<span class="sourceLineNo">1329</span><a name="line.1329"></a>
-<span class="sourceLineNo">1330</span>  /**<a name="line.1330"></a>
-<span class="sourceLineNo">1331</span>   * Generates and returns a Delete 
containing the region info for the catalog<a name="line.1331"></a>
-<span class="sourceLineNo">1332</span>   * table<a name="line.1332"></a>
-<span class="sourceLineNo">1333</span>   */<a name="line.1333"></a>
-<span class="sourceLineNo">1334</span>  public static Delete 
makeDeleteFromRegionInfo(RegionInfo regionInfo) {<a name="line.1334"></a>
-<span class="sourceLineNo">1335</span>    long now = 
EnvironmentEdgeManager.currentTime();<a name="line.1335"></a>
-<span class="sourceLineNo">1336</span>    return 
makeDeleteFromRegionInfo(regionInfo, now);<a name="line.1336"></a>
-<span class="sourceLineNo">1337</span>  }<a name="line.1337"></a>
-<span class="sourceLineNo">1338</span><a name="line.1338"></a>
-<span class="sourceLineNo">1339</span>  /**<a name="line.1339"></a>
-<span class="sourceLineNo">1340</span>   * Generates and returns a Delete 
containing the region info for the catalog<a name="line.1340"></a>
-<span class="sourceLineNo">1341</span>   * table<a name="line.1341"></a>
-<span class="sourceLineNo">1342</span>   */<a name="line.1342"></a>
-<span class="sourceLineNo">1343</span>  public static Delete 
makeDeleteFromRegionInfo(RegionInfo regionInfo, long ts) {<a 
name="line.1343"></a>
-<span class="sourceLineNo">1344</span>    if (regionInfo == null) {<a 
name="line.1344"></a>
-<span class="sourceLineNo">1345</span>      throw new 
IllegalArgumentException("Can't make a delete for null region");<a 
name="line.1345"></a>
-<span class="sourceLineNo">1346</span>    }<a name="line.1346"></a>
-<span class="sourceLineNo">1347</span>    Delete delete = new 
Delete(regionInfo.getRegionName());<a name="line.1347"></a>
-<span class="sourceLineNo">1348</span>    delete.addFamily(getCatalogFamily(), 
ts);<a name="line.1348"></a>
-<span class="sourceLineNo">1349</span>    return delete;<a 
name="line.1349"></a>
-<span class="sourceLineNo">1350</span>  }<a name="line.1350"></a>
-<span class="sourceLineNo">1351</span><a name="line.1351"></a>
-<span class="sourceLineNo">1352</span>  public static Put 
makeBarrierPut(byte[] encodedRegionName, long seq, byte[] tableName)<a 
name="line.1352"></a>
-<span class="sourceLineNo">1353</span>      throws IOException {<a 
name="line.1353"></a>
-<span class="sourceLineNo">1354</span>    byte[] seqBytes = 
Bytes.toBytes(seq);<a name="line.1354"></a>
-<span class="sourceLineNo">1355</span>    Put put = new 
Put(encodedRegionName);<a name="line.1355"></a>
-<span class="sourceLineNo">1356</span>    
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1356"></a>
-<span class="sourceLineNo">1357</span>            .setRow(put.getRow())<a 
name="line.1357"></a>
-<span class="sourceLineNo">1358</span>            
.setFamily(HConstants.REPLICATION_BARRIER_FAMILY)<a name="line.1358"></a>
-<span class="sourceLineNo">1359</span>            .setQualifier(seqBytes)<a 
name="line.1359"></a>
-<span class="sourceLineNo">1360</span>            
.setTimestamp(put.getTimeStamp())<a name="line.1360"></a>
-<span class="sourceLineNo">1361</span>            .setType(Type.Put)<a 
name="line.1361"></a>
-<span class="sourceLineNo">1362</span>            .setValue(seqBytes)<a 
name="line.1362"></a>
-<span class="sourceLineNo">1363</span>            .build())<a 
name="line.1363"></a>
-<span class="sourceLineNo">1364</span>       
.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1364"></a>
-<span class="sourceLineNo">1365</span>            .setRow(put.getRow())<a 
name="line.1365"></a>
-<span class="sourceLineNo">1366</span>            
.setFamily(HConstants.REPLICATION_META_FAMILY)<a name="line.1366"></a>
-<span class="sourceLineNo">1367</span>            .setQualifier(tableNameCq)<a 
name="line.1367"></a>
-<span class="sourceLineNo">1368</span>            
.setTimestamp(put.getTimeStamp())<a name="line.1368"></a>
-<span class="sourceLineNo">1369</span>            .setType(Cell.Type.Put)<a 
name="line.1369"></a>
-<span class="sourceLineNo">1370</span>            .setValue(tableName)<a 
name="line.1370"></a>
-<span class="sourceLineNo">1371</span>            .build());<a 
name="line.1371"></a>
-<span class="sourceLineNo">1372</span>    return put;<a name="line.1372"></a>
-<span class="sourceLineNo">1373</span>  }<a name="line.1373"></a>
-<span class="sourceLineNo">1374</span><a name="line.1374"></a>
-<span class="sourceLineNo">1375</span><a name="line.1375"></a>
-<span class="sourceLineNo">1376</span>  public static Put 
makeDaughterPut(byte[] encodedRegionName, byte[] value) throws IOException {<a 
name="line.1376"></a>
-<span class="sourceLineNo">1377</span>    Put put = new 
Put(encodedRegionName);<a name="line.1377"></a>
-<span class="sourceLineNo">1378</span>    
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1378"></a>
-<span class="sourceLineNo">1379</span>            .setRow(put.getRow())<a 
name="line.1379"></a>
-<span class="sourceLineNo">1380</span>            
.setFamily(HConstants.REPLICATION_META_FAMILY)<a name="line.1380"></a>
-<span class="sourceLineNo">1381</span>            
.setQualifier(daughterNameCq)<a name="line.1381"></a>
-<span class="sourceLineNo">1382</span>            
.setTimestamp(put.getTimeStamp())<a name="line.1382"></a>
-<span class="sourceLineNo">1383</span>            .setType(Type.Put)<a 
name="line.1383"></a>
-<span class="sourceLineNo">1384</span>            .setValue(value)<a 
name="line.1384"></a>
-<span class="sourceLineNo">1385</span>            .build());<a 
name="line.1385"></a>
-<span class="sourceLineNo">1386</span>    return put;<a name="line.1386"></a>
-<span class="sourceLineNo">1387</span>  }<a name="line.1387"></a>
-<span class="sourceLineNo">1388</span><a name="line.1388"></a>
-<span class="sourceLineNo">1389</span>  public static Put makeParentPut(byte[] 
encodedRegionName, byte[] value) throws IOException {<a name="line.1389"></a>
-<span class="sourceLineNo">1390</span>    Put put = new 
Put(encodedRegionName);<a name="line.1390"></a>
-<span class="sourceLineNo">1391</span>    
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1391"></a>
-<span class="sourceLineNo">1392</span>            .setRow(put.getRow())<a 
name="line.1392"></a>
-<span class="sourceLineNo">1393</span>            
.setFamily(HConstants.REPLICATION_META_FAMILY)<a name="line.1393"></a>
-<span class="sourceLineNo">1394</span>            
.setQualifier(parentNameCq)<a name="line.1394"></a>
-<span class="sourceLineNo">1395</span>            
.setTimestamp(put.getTimeStamp())<a name="line.1395"></a>
-<span class="sourceLineNo">1396</span>            .setType(Type.Put)<a 
name="line.1396"></a>
-<span class="sourceLineNo">1397</span>            .setValue(value)<a 
name="line.1397"></a>
-<span class="sourceLineNo">1398</span>            .build());<a 
name="line.1398"></a>
-<span class="sourceLineNo">1399</span>    return put;<a name="line.1399"></a>
-<span class="sourceLineNo">1400</span>  }<a name="line.1400"></a>
-<span class="sourceLineNo">1401</span><a name="line.1401"></a>
-<span class="sourceLineNo">1402</span>  /**<a name="line.1402"></a>
-<span class="sourceLineNo">1403</span>   * Adds split daughters to the Put<a 
name="line.1403"></a>
-<span class="sourceLineNo">1404</span>   */<a name="line.1404"></a>
-<span class="sourceLineNo">1405</span>  public static Put 
addDaughtersToPut(Put put, RegionInfo splitA, RegionInfo splitB)<a 
name="line.1405"></a>
-<span class="sourceLineNo">1406</span>      throws IOException {<a 
name="line.1406"></a>
-<span class="sourceLineNo">1407</span>    if (splitA != null) {<a 
name="line.1407"></a>
-<span class="sourceLineNo">1408</span>      
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1408"></a>
-<span class="sourceLineNo">1409</span>                .setRow(put.getRow())<a 
name="line.1409"></a>
-<span class="sourceLineNo">1410</span>                
.setFamily(HConstants.CATALOG_FAMILY)<a name="line.1410"></a>
-<span class="sourceLineNo">1411</span>                
.setQualifier(HConstants.SPLITA_QUALIFIER)<a name="line.1411"></a>
-<span class="sourceLineNo">1412</span>                
.setTimestamp(put.getTimeStamp())<a name="line.1412"></a>
-<span class="sourceLineNo">1413</span>                .setType(Type.Put)<a 
name="line.1413"></a>
-<span class="sourceLineNo">1414</span>                
.setValue(RegionInfo.toByteArray(splitA))<a name="line.1414"></a>
-<span class="sourceLineNo">1415</span>                .build());<a 
name="line.1415"></a>
-<span class="sourceLineNo">1416</span>    }<a name="line.1416"></a>
-<span class="sourceLineNo">1417</span>    if (splitB != null) {<a 
name="line.1417"></a>
-<span class="sourceLineNo">1418</span>      
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1418"></a>
-<span class="sourceLineNo">1419</span>                .setRow(put.getRow())<a 
name="line.1419"></a>
-<span class="sourceLineNo">1420</span>                
.setFamily(HConstants.CATALOG_FAMILY)<a name="line.1420"></a>
-<span class="sourceLineNo">1421</span>                
.setQualifier(HConstants.SPLITB_QUALIFIER)<a name="line.1421"></a>
-<span class="sourceLineNo">1422</span>                
.setTimestamp(put.getTimeStamp())<a name="line.1422"></a>
-<span class="sourceLineNo">1423</span>                .setType(Type.Put)<a 
name="line.1423"></a>
-<span class="sourceLineNo">1424</span>                
.setValue(RegionInfo.toByteArray(splitB))<a name="line.1424"></a>
-<span class="sourceLineNo">1425</span>                .build());<a 
name="line.1425"></a>
-<span class="sourceLineNo">1426</span>    }<a name="line.1426"></a>
-<span class="sourceLineNo">1427</span>    return put;<a name="line.1427"></a>
-<span class="sourceLineNo">1428</span>  }<a name="line.1428"></a>
-<span class="sourceLineNo">1429</span><a name="line.1429"></a>
-<span class="sourceLineNo">1430</span>  /**<a name="line.1430"></a>
-<span class="sourceLineNo">1431</span>   * Put the passed 
&lt;code&gt;puts&lt;/code&gt; to the &lt;code&gt;hbase:meta&lt;/code&gt; 
table.<a name="line.1431"></a>
-<span class="sourceLineNo">1432</span>   * Non-atomic for multi puts.<a 
name="line.1432"></a>
-<span class="sourceLineNo">1433</span>   * @param connection connection we're 
using<a name="line.1433"></a>
-<span class="sourceLineNo">1434</span>   * @param puts Put to add to 
hbase:meta<a name="line.1434"></a>
-<span class="sourceLineNo">1435</span>   * @throws IOException<a 
name="line.1435"></a>
-<span class="sourceLineNo">1436</span>   */<a name="line.1436"></a>
-<span class="sourceLineNo">1437</span>  public static void 
putToMetaTable(final Connection connection, final Put... puts)<a 
name="line.1437"></a>
-<span class="sourceLineNo">1438</span>    throws IOException {<a 
name="line.1438"></a>
-<span class="sourceLineNo">1439</span>    put(getMetaHTable(connection), 
Arrays.asList(puts));<a name="line.1439"></a>
-<span class="sourceLineNo">1440</span>  }<a name="line.1440"></a>
-<span class="sourceLineNo">1441</span><a name="line.1441"></a>
-<span class="sourceLineNo">1442</span>  /**<a name="line.1442"></a>
-<span class="sourceLineNo">1443</span>   * @param t Table to use (will be 
closed when done).<a name="line.1443"></a>
-<span class="sourceLineNo">1444</span>   * @param puts puts to make<a 
name="line.1444"></a>
-<span class="sourceLineNo">1445</span>   * @throws IOException<a 
name="line.1445"></a>
-<span class="sourceLineNo">1446</span>   */<a name="line.1446"></a>
-<span class="sourceLineNo">1447</span>  private static void put(final Table t, 
final List&lt;Put&gt; puts) throws IOException {<a name="line.1447"></a>
-<span class="sourceLineNo">1448</span>    try {<a name="line.1448"></a>
-<span class="sourceLineNo">1449</span>      debugLogMutations(puts);<a 
name="line.1449"></a>
-<span class="sourceLineNo">1450</span>      t.put(puts);<a 
name="line.1450"></a>
-<span class="sourceLineNo">1451</span>    } finally {<a name="line.1451"></a>
-<span class="sourceLineNo">1452</span>      t.close();<a name="line.1452"></a>
-<span class="sourceLineNo">1453</span>    }<a name="line.1453"></a>
-<span class="sourceLineNo">1454</span>  }<a name="line.1454"></a>
-<span class="sourceLineNo">1455</span><a name="line.1455"></a>
-<span class="sourceLineNo">1456</span>  /**<a name="line.1456"></a>
-<span class="sourceLineNo">1457</span>   * Put the passed 
&lt;code&gt;ps&lt;/code&gt; to the &lt;code&gt;hbase:meta&lt;/code&gt; table.<a 
name="line.1457"></a>
-<span class="sourceLineNo">1458</span>   * @param connection connection we're 
using<a name="line.1458"></a>
-<span class="sourceLineNo">1459</span>   * @param ps Put to add to 
hbase:meta<a name="line.1459"></a>
-<span class="sourceLineNo">1460</span>   * @throws IOException<a 
name="line.1460"></a>
-<span class="sourceLineNo">1461</span>   */<a name="line.1461"></a>
-<span class="sourceLineNo">1462</span>  public static void 
putsToMetaTable(final Connection connection, final List&lt;Put&gt; ps)<a 
name="line.1462"></a>
-<span class="sourceLineNo">1463</span>    throws IOException {<a 
name="line.1463"></a>
-<span class="sourceLineNo">1464</span>    Table t = 
getMetaHTable(connection);<a name="line.1464"></a>
-<span class="sourceLineNo">1465</span>    try {<a name="line.1465"></a>
-<span class="sourceLineNo">1466</span>      debugLogMutations(ps);<a 
name="line.1466"></a>
-<span class="sourceLineNo">1467</span>      t.put(ps);<a name="line.1467"></a>
-<span class="sourceLineNo">1468</span>    } finally {<a name="line.1468"></a>
-<span class="sourceLineNo">1469</span>      t.close();<a name="line.1469"></a>
-<span class="sourceLineNo">1470</span>    }<a name="line.1470"></a>
-<span class="sourceLineNo">1471</span>  }<a name="line.1471"></a>
-<span class="sourceLineNo">1472</span><a name="line.1472"></a>
-<span class="sourceLineNo">1473</span>  /**<a name="line.1473"></a>
-<span class="sourceLineNo">1474</span>   * Delete the passed 
&lt;code&gt;d&lt;/code&gt; from the &lt;code&gt;hbase:meta&lt;/code&gt; 
table.<a name="line.1474"></a>
-<span class="sourceLineNo">1475</span>   * @param connection connection we're 
using<a name="line.1475"></a>
-<span class="sourceLineNo">1476</span>   * @param d Delete to add to 
hbase:meta<a name="line.1476"></a>
-<span class="sourceLineNo">1477</span>   * @throws IOException<a 
name="line.1477"></a>
-<span class="sourceLineNo">1478</span>   */<a name="line.1478"></a>
-<span class="sourceLineNo">1479</span>  static void deleteFromMetaTable(final 
Connection connection, final Delete d)<a name="line.1479"></a>
-<span class="sourceLineNo">1480</span>    throws IOException {<a 
name="line.1480"></a>
-<span class="sourceLineNo">1481</span>    List&lt;Delete&gt; dels = new 
ArrayList&lt;&gt;(1);<a name="line.1481"></a>
-<span class="sourceLineNo">1482</span>    dels.add(d);<a name="line.1482"></a>
-<span class="sourceLineNo">1483</span>    deleteFromMetaTable(connection, 
dels);<a name="line.1483"></a>
-<span class="sourceLineNo">1484</span>  }<a name="line.1484"></a>
-<span class="sourceLineNo">1485</span><a name="line.1485"></a>
-<span class="sourceLineNo">1486</span>  /**<a name="line.1486"></a>
-<span class="sourceLineNo">1487</span>   * Delete the passed 
&lt;code&gt;deletes&lt;/code&gt; from the &lt;code&gt;hbase:meta&lt;/code&gt; 
table.<a name="line.1487"></a>
-<span class="sourceLineNo">1488</span>   * @param connection connection we're 
using<a name="line.1488"></a>
-<span class="sourceLineNo">1489</span>   * @param deletes Deletes to add to 
hbase:meta  This list should support #remove.<a name="line.1489"></a>
-<span class="sourceLineNo">1490</span>   * @throws IOException<a 
name="line.1490"></a>
-<span class="sourceLineNo">1491</span>   */<a name="line.1491"></a>
-<span class="sourceLineNo">1492</span>  public static void 
deleteFromMetaTable(final Connection connection, final List&lt;Delete&gt; 
deletes)<a name="line.1492"></a>
-<span class="sourceLineNo">1493</span>    throws IOException {<a 
name="line.1493"></a>
-<span class="sourceLineNo">1494</span>    Table t = 
getMetaHTable(connection);<a name="line.1494"></a>
-<span class="sourceLineNo">1495</span>    try {<a name="line.1495"></a>
-<span class="sourceLineNo">1496</span>      debugLogMutations(deletes);<a 
name="line.1496"></a>
-<span class="sourceLineNo">1497</span>      t.delete(deletes);<a 
name="line.1497"></a>
-<span class="sourceLineNo">1498</span>    } finally {<a name="line.1498"></a>
-<span class="sourceLineNo">1499</span>      t.close();<a name="line.1499"></a>
-<span class="sourceLineNo">1500</span>    }<a name="line.1500"></a>
-<span class="sourceLineNo">1501</span>  }<a name="line.1501"></a>
-<span class="sourceLineNo">1502</span><a name="line.1502"></a>
-<span class="sourceLineNo">1503</span>  /**<a name="line.1503"></a>
-<span class="sourceLineNo">1504</span>   * Deletes some replica columns 
corresponding to replicas for the passed rows<a name="line.1504"></a>
-<span class="sourceLineNo">1505</span>   * @param metaRows rows in 
hbase:meta<a name="line.1505"></a>
-<span class="sourceLineNo">1506</span>   * @param replicaIndexToDeleteFrom the 
replica ID we would start deleting from<a name="line.1506"></a>
-<span class="sourceLineNo">1507</span>   * @param numReplicasToRemove how many 
replicas to remove<a name="line.1507"></a>
-<span class="sourceLineNo">1508</span>   * @param connection connection we're 
using to access meta table<a name="line.1508"></a>
-<span class="sourceLineNo">1509</span>   * @throws IOException<a 
name="line.1509"></a>
-<span class="sourceLineNo">1510</span>   */<a name="line.1510"></a>
-<span class="sourceLineNo">1511</span>  public static void 
removeRegionReplicasFromMeta(Set&lt;byte[]&gt; metaRows,<a name="line.1511"></a>
-<span class="sourceLineNo">1512</span>    int replicaIndexToDeleteFrom, int 
numReplicasToRemove, Connection connection)<a name="line.1512"></a>
-<span class="sourceLineNo">1513</span>      throws IOException {<a 
name="line.1513"></a>
-<span class="sourceLineNo">1514</span>    int absoluteIndex = 
replicaIndexToDeleteFrom + numReplicasToRemove;<a name="line.1514"></a>
-<span class="sourceLineNo">1515</span>    for (byte[] row : metaRows) {<a 
name="line.1515"></a>
-<span class="sourceLineNo">1516</span>      long now = 
EnvironmentEdgeManager.currentTime();<a name="line.1516"></a>
-<span class="sourceLineNo">1517</span>      Delete deleteReplicaLocations = 
new Delete(row);<a name="line.1517"></a>
-<span class="sourceLineNo">1518</span>      for (int i = 
replicaIndexToDeleteFrom; i &lt; absoluteIndex; i++) {<a name="line.1518"></a>
-<span class="sourceLineNo">1519</span>        
deleteReplicaLocations.addColumns(getCatalogFamily(),<a name="line.1519"></a>
-<span class="sourceLineNo">1520</span>          getServerColumn(i), now);<a 
name="line.1520"></a>
-<span class="sourceLineNo">1521</span>        
deleteReplicaLocations.addColumns(getCatalogFamily(),<a name="line.1521"></a>
-<span class="sourceLineNo">1522</span>          getSeqNumColumn(i), now);<a 
name="line.1522"></a>
-<span class="sourceLineNo">1523</span>        
deleteReplicaLocations.addColumns(getCatalogFamily(),<a name="line.1523"></a>
-<span class="sourceLineNo">1524</span>          getStartCodeColumn(i), now);<a 
name="line.1524"></a>
-<span class="sourceLineNo">1525</span>      }<a name="line.1525"></a>
-<span class="sourceLineNo">1526</span>      deleteFromMetaTable(connection, 
deleteReplicaLocations);<a name="line.1526"></a>
-<span class="sourceLineNo">1527</span>    }<a name="line.1527"></a>
-<span class="sourceLineNo">1528</span>  }<a name="line.1528"></a>
-<span class="sourceLineNo">1529</span><a name="line.1529"></a>
-<span class="sourceLineNo">1530</span>  /**<a name="line.1530"></a>
-<span class="sourceLineNo">1531</span>   * Execute the passed 
&lt;code&gt;mutations&lt;/code&gt; against &lt;code&gt;hbase:meta&lt;/code&gt; 
table.<a name="line.1531"></a>
-<span class="sourceLineNo">1532</span>   * @param connection connection we're 
using<a name="line.1532"></a>
-<span class="sourceLineNo">1533</span>   * @param mutations Puts and Deletes 
to execute on hbase:meta<a name="line.1533"></a>
-<span class="sourceLineNo">1534</span>   * @throws IOException<a 
name="line.1534"></a>
-<span class="sourceLineNo">1535</span>   */<a name="line.1535"></a>
-<span class="sourceLineNo">1536</span>  public static void 
mutateMetaTable(final Connection connection,<a name="line.1536"></a>
-<span class="sourceLineNo">1537</span>                                     
final List&lt;Mutation&gt; mutations)<a name="line.1537"></a>
-<span class="sourceLineNo">1538</span>    throws IOException {<a 
name="line.1538"></a>
-<span class="sourceLineNo">1539</span>    Table t = 
getMetaHTable(connection);<a name="line.1539"></a>
-<span class="sourceLineNo">1540</span>    try {<a name="line.1540"></a>
-<span class="sourceLineNo">1541</span>      debugLogMutations(mutations);<a 
name="line.1541"></a>
-<span class="sourceLineNo">1542</span>      t.batch(mutations, null);<a 
name="line.1542"></a>
-<span class="sourceLineNo">1543</span>    } catch (InterruptedException e) {<a 
name="line.1543"></a>
-<span class="sourceLineNo">1544</span>      InterruptedIOException ie = new 
InterruptedIOException(e.getMessage());<a name="line.1544"></a>
-<span class="sourceLineNo">1545</span>      ie.initCause(e);<a 
name="line.1545"></a>
-<span class="sourceLineNo">1546</span>      throw ie;<a name="line.1546"></a>
-<span class="sourceLineNo">1547</span>    } finally {<a name="line.1547"></a>
-<span class="sourceLineNo">1548</span>      t.close();<a name="line.1548"></a>
-<span class="sourceLineNo">1549</span>    }<a name="line.1549"></a>
-<span class="sourceLineNo">1550</span>  }<a name="line.1550"></a>
-<span class="sourceLineNo">1551</span><a name="line.1551"></a>
-<span class="sourceLineNo">1552</span>  static void addRegionStateToPut(Put 
put, RegionState.State  state) throws IOException {<a name="line.1552"></a>
-<span class="sourceLineNo">1553</span>    
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1553"></a>
-<span class="sourceLineNo">1554</span>        .setRow(put.getRow())<a 
name="line.1554"></a>
-<span class="sourceLineNo">1555</span>        
.setFamily(HConstants.CATALOG_FAMILY)<a name="line.1555"></a>
-<span class="sourceLineNo">1556</span>        
.setQualifier(getRegionStateColumn())<a name="line.1556"></a>
-<span class="sourceLineNo">1557</span>        
.setTimestamp(put.getTimeStamp())<a name="line.1557"></a>
-<span class="sourceLineNo">1558</span>        .setType(Cell.Type.Put)<a 
name="line.1558"></a>
-<span class="sourceLineNo">1559</span>        
.setValue(Bytes.toBytes(state.name()))<a name="line.1559"></a>
-<span class="sourceLineNo">1560</span>        .build());<a 
name="line.1560"></a>
-<span class="sourceLineNo">1561</span>  }<a name="line.1561"></a>
-<span class="sourceLineNo">1562</span><a name="line.1562"></a>
-<span class="sourceLineNo">1563</span>  /**<a name="line.1563"></a>
-<span class="sourceLineNo">1564</span>   * Adds daughter region infos to 
hbase:meta row for the specified region. Note that this does not<a 
name="line.1564"></a>
-<span class="sourceLineNo">1565</span>   * add its daughter's as different 
rows, but adds information about the daughters in the same row<a 
name="line.1565"></a>
-<span class="sourceLineNo">1566</span>   * as the parent. Use<a 
name="line.1566"></a>
-<span class="sourceLineNo">1567</span>   * {@link #splitRegion(Connection, 
RegionInfo, RegionInfo, RegionInfo, ServerName,int,boolean)}<a 
name="line.1567"></a>
-<span class="sourceLineNo">1568</span>   * if you want to do that.<a 
name="line.1568"></a>
-<span class="sourceLineNo">1569</span>   * @param connection connection we're 
using<a name="line.1569"></a>
-<span class="sourceLineNo">1570</span>   * @param regionInfo RegionInfo of 
parent region<a name="line.1570"></a>
-<span class="sourceLineNo">1571</span>   * @param splitA first split daughter 
of the parent regionInfo<a name="line.1571"></a>
-<span class="sourceLineNo">1572</span>   * @param splitB second split daughter 
of the parent regionInfo<a name="line.1572"></a>
-<span class="sourceLineNo">1573</span>   * @throws IOException if problem 
connecting or updating meta<a name="line.1573"></a>
-<span class="sourceLineNo">1574</span>   */<a name="line.1574"></a>
-<span class="sourceLineNo">1575</span>  public static void 
addSpiltsToParent(Connection connection, RegionInfo regionInfo,<a 
name="line.1575"></a>
-<span class="sourceLineNo">1576</span>      RegionInfo splitA, RegionInfo 
splitB) throws IOException {<a name="line.1576"></a>
-<span class="sourceLineNo">1577</span>    Table meta = 
getMetaHTable(connection);<a name="line.1577"></a>
-<span class="sourceLineNo">1578</span>    try {<a name="line.1578"></a>
-<span class="sourceLineNo">1579</span>      Put put = 
makePutFromRegionInfo(regionInfo);<a name="line.1579"></a>
-<span class="sourceLineNo">1580</span>      addDaughtersToPut(put, splitA, 
splitB);<a name="line.1580"></a>
-<span class="sourceLineNo">1581</span>      meta.put(put);<a 
name="line.1581"></a>
-<span class="sourceLineNo">1582</span>      debugLogMutation(put);<a 
name="line.1582"></a>
-<span class="sourceLineNo">1583</span>      LOG.debug("Added region {}", 
regionInfo.getRegionNameAsString());<a name="line.1583"></a>
-<span class="sourceLineNo">1584</span>    } finally {<a name="line.1584"></a>
-<span class="sourceLineNo">1585</span>      meta.close();<a 
name="line.1585"></a>
-<span class="sourceLineNo">1586</span>    }<a name="line.1586"></a>
-<span class="sourceLineNo">1587</span>  }<a name="line.1587"></a>
-<span class="sourceLineNo">1588</span><a name="line.1588"></a>
-<span class="sourceLineNo">1589</span>  /**<a name="line.1589"></a>
-<span class="sourceLineNo">1590</span>   * Adds a hbase:meta row for the 
specified new region. Initial state of new region is CLOSED.<a 
name="line.1590"></a>
-<span class="sourceLineNo">1591</span>   * @param connection connection we're 
using<a name="line.1591"></a>
-<span class="sourceLineNo">1592</span>   * @param regionInfo region 
information<a name="line.1592"></a>
-<span class="sourceLineNo">1593</span>   * @throws IOException if problem 
connecting or updating meta<a name="line.1593"></a>
-<span class="sourceLineNo">1594</span>   */<a name="line.1594"></a>
-<span class="sourceLineNo">1595</span>  @VisibleForTesting<a 
name="line.1595"></a>
-<span class="sourceLineNo">1596</span>  public static void 
addRegionToMeta(Connection connection, RegionInfo regionInfo)<a 
name="line.1596"></a>
-<span class="sourceLineNo">1597</span>      throws IOException {<a 
name="line.1597"></a>
-<span class="sourceLineNo">1598</span>    addRegionsToMeta(connection, 
Collections.singletonList(regionInfo), 1);<a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>  }<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span><a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>  /**<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>   * Adds a hbase:meta row for each of 
the specified new regions. Initial state for new regions<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>   * is CLOSED.<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>   * @param connection connection we're 
using<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>   * @param regionInfos region 
information list<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>   * @throws IOException if problem 
connecting or updating meta<a name="line.1606"></a>
-<span class="sourceLineNo">1607</span>   */<a name="line.1607"></a>
-<span class="sourceLineNo">1608</span>  public static void 
addRegionsToMeta(Connection connection, List&lt;RegionInfo&gt; regionInfos,<a 
name="line.1608"></a>
-<span class="sourceLineNo">1609</span>      int regionReplication) throws 
IOException {<a name="line.1609"></a>
-<span class="sourceLineNo">1610</span>    addRegionsToMeta(connection, 
regionInfos, regionReplication, HConstants.LATEST_TIMESTAMP);<a 
name="line.1610"></a>
-<span class="sourceLineNo">1611</span>  }<a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>  /**<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>   * Adds a hbase:meta row for each of 
the specified new regions. Initial state for new regions<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>   * is CLOSED.<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>   * @param connection connection we're 
using<a name="line.1615"></a>
-<span class="sourceLineNo">1616</span>   * @param regionInfos region 
information list<a name="line.1616"></a>
-<span class="sourceLineNo">1617</span>   * @param regionReplication<a 
name="line.1617"></a>
-<span class="sourceLineNo">1618</span>   * @param ts desired timestamp<a 
name="line.1618"></a>
-<span class="sourceLineNo">1619</span>   * @throws IOException if problem 
connecting or updating meta<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>   */<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>  public static void 
addRegionsToMeta(Connection connection, List&lt;RegionInfo&gt; regionInfos,<a 
name="line.1621"></a>
-<span class="sourceLineNo">1622</span>      int regionReplication, long ts) 
throws IOException {<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span>    List&lt;Put&gt; puts = new 
ArrayList&lt;&gt;();<a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>    for (RegionInfo regionInfo : 
regionInfos) {<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span>      if 
(RegionReplicaUtil.isDefaultReplica(regionInfo)) {<a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>        Put put = 
makePutFromRegionInfo(regionInfo, ts);<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span>        // New regions are added with 
initial state of CLOSED.<a name="line.1627"></a>
-<span class="sourceLineNo">1628</span>        addRegionStateToPut(put, 
RegionState.State.CLOSED);<a name="line.1628"></a>
-<span class="sourceLineNo">1629</span>        // Add empty locations for 
region replicas so that number of replicas can be cached<a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>        // whenever the primary region 
is looked up from meta<a name="line.1630"></a>
-<span class="sourceLineNo">1631</span>        for (int i = 1; i &lt; 
regionReplication; i++) {<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>          addEmptyLocation(put, i);<a 
name="line.1632"></a>
-<span class="sourceLineNo">1633</span>        }<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span>        puts.add(put);<a 
name="line.1634"></a>
-<span class="sourceLineNo">1635</span>      }<a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>    }<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>    putsToMetaTable(connection, puts);<a 
name="line.1637"></a>
-<span class="sourceLineNo">1638</span>    LOG.info("Added {} regions to 
meta.", puts.size());<a name="line.1638"></a>
-<span class="sourceLineNo">1639</span>  }<a name="line.1639"></a>
-<span class="sourceLineNo">1640</span><a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>  /**<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span>   * Merge the two regions into one in 
an atomic operation. Deletes the two<a name="line.1642"></a>
-<span class="sourceLineNo">1643</span>   * merging regions in hbase:meta and 
adds the merged region with the information of<a name="line.1643"></a>
-<span class="sourceLineNo">1644</span>   * two merging regions.<a 
name="line.1644"></a>
-<span class="sourceLineNo">1645</span>   * @param connection connection we're 
using<a name="line.1645"></a>
-<span class="sourceLineNo">1646</span>   * @param mergedRegion the merged 
region<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>   * @param regionA<a 
name="line.1647"></a>
-<span class="sourceLineNo">1648</span>   * @param regionB<a 
name="line.1648"></a>
-<span class="sourceLineNo">1649</span>   * @param sn the location of the 
region<a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>   * @param masterSystemTime<a 
name="line.1650"></a>
-<span class="sourceLineNo">1651</span>   * @param saveBarrier true if need 
save replication barrier in meta, used for serial replication<a 
name="line.1651"></a>
-<span class="sourceLineNo">1652</span>   * @throws IOException<a 
name="line.1652"></a>
-<span class="sourceLineNo">1653</span>   */<a name="line.1653"></a>
-<span class="sourceLineNo">1654</span>  public static void mergeRegions(final 
Connection connection, RegionInfo mergedRegion,<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>      RegionInfo regionA, RegionInfo 
regionB, ServerName sn, int regionReplication,<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span>      long masterSystemTime, boolean 
saveBarrier)<a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>          throws IOException {<a 
name="line.1657"></a>
-<span class="sourceLineNo">1658</span>    Table meta = 
getMetaHTable(connection);<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span>    try {<a name="line.1659"></a>
-<span class="sourceLineNo">1660</span>      // use the maximum of what master 
passed us vs local time.<a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>      long time = 
Math.max(EnvironmentEdgeManager.currentTime(), masterSystemTime);<a 
name="line.1661"></a>
-<span class="sourceLineNo">1662</span><a name="line.1662"></a>
-<span class="sourceLineNo">1663</span>      // Put for parent<a 
name="line.1663"></a>
-<span class="sourceLineNo">1664</span>      Put putOfMerged = 
makePutFromRegionInfo(mergedRegion, time);<a name="line.1664"></a>
-<span class="sourceLineNo">1665</span>      
putOfMerged.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1665"></a>
-<span class="sourceLineNo">1666</span>              
.setRow(putOfMerged.getRow())<a name="line.1666"></a>
-<span class="sourceLineNo">1667</span>              
.setFamily(HConstants.CATALOG_FAMILY)<a name="line.1667"></a>
-<span class="sourceLineNo">1668</span>              
.setQualifier(HConstants.MERGEA_QUALIFIER)<a name="line.1668"></a>
-<span class="sourceLineNo">1669</span>              
.setTimestamp(putOfMerged.getTimeStamp())<a name="line.1669"></a>
-<span class="sourceLineNo">1670</span>              .setType(Type.Put)<a 
name="line.1670"></a>
-<span class="sourceLineNo">1671</span>              
.setValue(RegionInfo.toByteArray(regionA))<a name="line.1671"></a>
-<span class="sourceLineNo">1672</span>              .build())<a 
name="line.1672"></a>
-<span class="sourceLineNo">1673</span>          
.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1673"></a>
-<span class="sourceLineNo">1674</span>              
.setRow(putOfMerged.getRow())<a name="line.1674"></a>
-<span class="sourceLineNo">1675</span>              
.setFamily(HConstants.CATALOG_FAMILY)<a name="line.1675"></a>
-<span class="sourceLineNo">1676</span>              
.setQualifier(HConstants.MERGEB_QUALIFIER)<a name="line.1676"></a>
-<span class="sourceLineNo">1677</span>              
.setTimestamp(putOfMerged.getTimeStamp())<a name="line.1677"></a>
-<span class="sourceLineNo">1678</span>              .setType(Type.Put)<a 
name="line.1678"></a>
-<span class="sourceLineNo">1679</span>              
.setValue(RegionInfo.toByteArray(regionB))<a name="line.1679"></a>
-<span class="sourceLineNo">1680</span>              .build());<a 
name="line.1680"></a>
-<span class="sourceLineNo">1681</span><a name="line.1681"></a>
-<span class="sourceLineNo">1682</span>      // Set initial state to CLOSED<a 
name="line.1682"></a>
-<span class="sourceLineNo">1683</span>      // NOTE: If initial state is not 
set to CLOSED then merged region gets added with the<a name="line.1683"></a>
-<span class="sourceLineNo">1684</span>      // default OFFLINE state. If 
Master gets restarted after this step, start up sequence of<a 
name="line.1684"></a>
-<span class="sourceLineNo">1685</span>      // master tries to assign this 
offline region. This is followed by re-assignments of the<a 
name="line.1685"></a>
-<span class="sourceLineNo">1686</span>      // merged region from resumed 
{@link MergeTableRegionsProcedure}<a name="line.1686"></a>
-<span class="sourceLineNo">1687</span>      addRegionStateToPut(putOfMerged, 
RegionState.State.CLOSED);<a name="line.1687"></a>
-<span class="sourceLineNo">1688</span><a name="line.1688"></a>
-<span class="sourceLineNo">1689</span>      // Deletes for merging regions<a 
name="line.1689"></a>
-<span class="sourceLineNo">1690</span>      Delete deleteA = 
makeDeleteFromRegionInfo(regionA, time);<a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>      Delete deleteB = 
makeDeleteFromRegionInfo(regionB, time);<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span><a name="line.1692"></a>
-<span class="sourceLineNo">1693</span>      // The merged is a new region, 
openSeqNum = 1 is fine. ServerName may be null<a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>      // if crash after merge happened 
but before we got to here.. means in-memory<a name="line.1694"></a>
-<span class="sourceLineNo">1695</span>      // locations of offlined merged, 
now-closed, regions is lost. Should be ok. We<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>      // assign the merged region 
later.<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>      if (sn != null) 
addLocation(putOfMerged, sn, 1, -1, mergedRegion.getReplicaId());<a 
name="line.1697"></a>
-<span class="sourceLineNo">1698</span><a name="line.1698"></a>
-<span class="sourceLineNo">1699</span>      // Add empty locations for region 
replicas of the merged region so that number of replicas can<a 
name="line.1699"></a>
-<span class="sourceLineNo">1700</span>      // be cached whenever the primary 
region is looked up from meta<a name="line.1700"></a>
-<span class="sourceLineNo">1701</span>      for (int i = 1; i &lt; 
regionReplication; i++) {<a name="line.1701"></a>
-<span class="sourceLineNo">1702</span>        addEmptyLocation(putOfMerged, 
i);<a name="line.1702"></a>
-<span class="sourceLineNo">1703</span>      }<a name="line.1703"></a>
-<span class="sourceLineNo">1704</span><a name="line.1704"></a>
-<span class="sourceLineNo">1705</span>      byte[] tableRow = 
Bytes.toBytes(mergedRegion.getRegionNameAsString()<a name="line.1705"></a>
-<span class="sourceLineNo">1706</span>        + HConstants.DELIMITER);<a 
name="line.1706"></a>
-<span class="sourceLineNo">1707</span>      Mutation[] mutations;<a 
name="line.1707"></a>
-<span class="sourceLineNo">1708</span>      if (saveBarrier) {<a 
name="line.1708"></a>
-<span class="sourceLineNo">1709</span>        Put putBarrierA = 
makeDaughterPut(regionA.getEncodedNameAsBytes(),<a name="line.1709"></a>
-<span class="sourceLineNo">1710</span>            
mergedRegion.getEncodedNameAsBytes());<a name="line.1710"></a>
-<span class="sourceLineNo">1711</span>        Put putBarrierB = 
makeDaughterPut(regionB.getEncodedNameAsBytes(),<a name="line.1711"></a>
-<span class="sourceLineNo">1712</span>            
mergedRegion.getEncodedNameAsBytes());<a name="line.1712"></a>
-<span class="sourceLineNo">1713</span>        Put putDaughter = 
makeParentPut(mergedRegion.getEncodedNameAsBytes(), Bytes.toBytes(<a 
name="line.1713"></a>
-<span class="sourceLineNo">1714</span>            regionA.getEncodedName() + 
"," + regionB.getEncodedName()));<a name="line.1714"></a>
-<span class="sourceLineNo">1715</span>        mutations = new Mutation[] { 
putOfMerged, deleteA, deleteB,<a name="line.1715"></a>
-<span class="sourceLineNo">1716</span>            putBarrierA, putBarrierB, 
putDaughter};<a name="line.1716"></a>
-<span class="sourceLineNo">1717</span>      } else {<a name="line.1717"></a>
-<span class="sourceLineNo">1718</span>        mutations = new Mutation[] { 
putOfMerged, deleteA, deleteB };<a name="line.1718"></a>
-<span class="sourceLineNo">1719</span>      }<a name="line.1719"></a>
-<span class="sourceLineNo">1720</span>      multiMutate(connection, meta, 
tableRow, mutations);<a name="line.1720"></a>
-<span class="sourceLineNo">1721</span>    } finally {<a name="line.1721"></a>
-<span class="sourceLineNo">1722</span>      meta.close();<a 
name="line.1722"></a>
-<span class="sourceLineNo">1723</span>    }<a name="line.1723"></a>
-<span class="sourceLineNo">1724</span>  }<a name="line.1724"></a>
-<span class="sourceLineNo">1725</span><a name="line.1725"></a>
-<span class="sourceLineNo">1726</span>  /**<a name="line.1726"></a>
-<span class="sourceLineNo">1727</span>   * Splits the region into two in an 
atomic operation. Offlines the parent<a name="line.1727"></a>
-<span class="sourceLineNo">1728</span>   * region with the information that it 
is split into two, and also adds<a name="line.1728"></a>
-<span class="sourceLineNo">1729</span>   * the daughter regions. Does not add 
the location information to the daughter<a name="line.1729"></a>
-<span class="sourceLineNo">1730</span>   * regions since they are not open 
yet.<a name="line.1730"></a>
-<span class="sourceLineNo">1731</span>   * @param connection connection we're 
using<a name="line.1731"></a>
-<span class="sourceLineNo">1732</span>   * @param parent the parent region 
which is split<a name="line.1732"></a>
-<span class="sourceLineNo">1733</span>   * @param splitA Split daughter region 
A<a name="line.1733"></a>
-<span class="sourceLineNo">1734</span>   * @param splitB Split daughter region 
A<a name="line.1734"></a>
-<span class="sourceLineNo">1735</span>   * @param sn the location of the 
region<a name="line.1735"></a>
-<span class="sourceLineNo">1736</span>   * @param saveBarrier true if need 
save replication barrier in meta, used for serial replication<a 
name="line.1736"></a>
-<span class="sourceLineNo">1737</span>   */<a name="line.1737"></a>
-<span class="sourceLineNo">1738</span>  public static void splitRegion(final 
Connection connection, RegionInfo parent,<a name="line.1738"></a>
-<span class="sourceLineNo">1739</span>      RegionInfo splitA, RegionInfo 
splitB, ServerName sn, int regionReplication,<a name="line.1739"></a>
-<span class="sourceLineNo">1740</span>      boolean saveBarrier) throws 
IOException {<a name="line.1740"></a>
-<span class="sourceLineNo">1741</span>    Table meta = 
getMetaHTable(connection);<a name="line.1741"></a>
-<span class="sourceLineNo">1742</span>    try {<a name="line.1742"></a>
-<span class="sourceLineNo">1743</span>      //Put for parent<a 
name="line.1743"></a>
-<span class="sourceLineNo">1744</span>      Put putParent = 
makePutFromRegionInfo(RegionInfoBuilder.newBuilder(parent)<a 
name="line.1744"></a>
-<span class="sourceLineNo">1745</span>                        
.setOffline(true)<a name="line.1745"></a>
-<span class="sourceLineNo">1746</span>                        
.setSplit(true).build());<a name="line.1746"></a>
-<span class="sourceLineNo">1747</span>      addDaughtersToPut(putParent, 
splitA, splitB);<a name="line.1747"></a>
-<span class="sourceLineNo">1748</span><a name="line.1748"></a>
-<span class="sourceLineNo">1749</span>      //Puts for daughters<a 
name="line.1749"></a>
-<span class="sourceLineNo">1750</span>      Put putA = 
makePutFromRegionInfo(splitA);<a name="line.1750"></a>
-<span class="sourceLineNo">1751</span>      Put putB = 
makePutFromRegionInfo(splitB);<a name="line.1751"></a>
-<span class="sourceLineNo">1752</span><a name="line.1752"></a>
-<span class="sourceLineNo">1753</span>      // Set initial state to CLOSED<a 
name="line.1753"></a>
-<span class="sourceLineNo">1754</span>      // NOTE: If initial state is not 
set to CLOSED then daughter regions get added with the<a name="line.1754"></a>
-<span class="sourceLineNo">1755</span>      // default OFFLINE state. If 
Master gets restarted after this step, start up sequence of<a 
name="line.1755"></a>
-<span class="sourceLineNo">1756</span>      // master tries to assign these 
offline regions. This is followed by re-assignments of the<a 
name="line.1756"></a>
-<span class="sourceLineNo">1757</span>      // daughter regions from resumed 
{@link SplitTableRegionProcedure}<a name="line.1757"></a>
-<span class="sourceLineNo">1758</span>      addRegionStateToPut(putA, 
RegionState.State.CLOSED);<a name="line.1758"></a>
-<span class="sourceLineNo">1759</span>      addRegionStateToPut(putA, 
RegionState.State.CLOSED);<a name="line.1759"></a>
-<span class="sourceLineNo">1760</span><a name="line.1760"></a>
-<span class="sourceLineNo">1761</span>      addSequenceNum(putA, 1, -1, 
splitA.getReplicaId()); //new regions, openSeqNum = 1 is fine.<a 
name="line.1761"></a>
-<span class="sourceLineNo">1762</span>      addSequenceNum(putB, 1, -1, 
splitB.getReplicaId());<a name="line.1762"></a>
+<span class="sourceLineNo">1277</span>      if 
(!(info.getTable().equals(tableName))) {<a name="line.1277"></a>
+<span class="sourceLineNo">1278</span>        return false;<a 
name="line.1278"></a>
+<span class="sourceLineNo">1279</span>      }<a name="line.1279"></a>
+<span class="sourceLineNo">1280</span>      return super.visit(rowResult);<a 
name="line.1280"></a>
+<span class="sourceLineNo">1281</span>    }<a name="line.1281"></a>
+<span class="sourceLineNo">1282</span>  }<a name="line.1282"></a>
+<span class="sourceLineNo">1283</span><a name="line.1283"></a>
+<span class="sourceLineNo">1284</span>  /**<a name="line.1284"></a>
+<span class="sourceLineNo">1285</span>   * Count regions in 
&lt;code&gt;hbase:meta&lt;/code&gt; for passed table.<a name="line.1285"></a>
+<span class="sourceLineNo">1286</span>   * @param c Configuration object<a 
name="line.1286"></a>
+<span class="sourceLineNo">1287</span>   * @param tableName table name to 
count regions for<a name="line.1287"></a>
+<span class="sourceLineNo">1288</span>   * @return Count or regions in table 
&lt;code&gt;tableName&lt;/code&gt;<a name="line.1288"></a>
+<span class="sourceLineNo">1289</span>   * @throws IOException<a 
name="line.1289"></a>
+<span class="sourceLineNo">1290</span>   */<a name="line.1290"></a>
+<span class="sourceLineNo">1291</span>  public static int getRegionCount(final 
Configuration c, final TableName tableName)<a name="line.1291"></a>
+<span class="sourceLineNo">1292</span>  throws IOException {<a 
name="line.1292"></a>
+<span class="sourceLineNo">1293</span>    try (Connection connection = 
ConnectionFactory.createConnection(c)) {<a name="line.1293"></a>
+<span class="sourceLineNo">1294</span>      return getRegionCount(connection, 
tableName);<a name="line.1294"></a>
+<span class="sourceLineNo">1295</span>    }<a name="line.1295"></a>
+<span class="sourceLineNo">1296</span>  }<a name="line.1296"></a>
+<span class="sourceLineNo">1297</span><a name="line.1297"></a>
+<span class="sourceLineNo">1298</span>  /**<a name="line.1298"></a>
+<span class="sourceLineNo">1299</span>   * Count regions in 
&lt;code&gt;hbase:meta&lt;/code&gt; for passed table.<a name="line.1299"></a>
+<span class="sourceLineNo">1300</span>   * @param connection Connection 
object<a name="line.1300"></a>
+<span class="sourceLineNo">1301</span>   * @param tableName table name to 
count regions for<a name="line.1301"></a>
+<span class="sourceLineNo">1302</span>   * @return Count or regions in table 
&lt;code&gt;tableName&lt;/code&gt;<a name="line.1302"></a>
+<span class="sourceLineNo">1303</span>   * @throws IOException<a 
name="line.1303"></a>
+<span class="sourceLineNo">1304</span>   */<a name="line.1304"></a>
+<span class="sourceLineNo">1305</span>  public static int getRegionCount(final 
Connection connection, final TableName tableName)<a name="line.1305"></a>
+<span class="sourceLineNo">1306</span>  throws IOException {<a 
name="line.1306"></a>
+<span class="sourceLineNo">1307</span>    try (RegionLocator locator = 
connection.getRegionLocator(tableName)) {<a name="line.1307"></a>
+<span class="sourceLineNo">1308</span>      List&lt;HRegionLocation&gt; 
locations = locator.getAllRegionLocations();<a name="line.1308"></a>
+<span class="sourceLineNo">1309</span>      return locations == null? 0: 
locations.size();<a name="line.1309"></a>
+<span class="sourceLineNo">1310</span>    }<a name="line.1310"></a>
+<span class="sourceLineNo">1311</span>  }<a name="line.1311"></a>
+<span class="sourceLineNo">1312</span><a name="line.1312"></a>
+<span class="sourceLineNo">1313</span>  ////////////////////////<a 
name="line.1313"></a>
+<span class="sourceLineNo">1314</span>  // Editing operations //<a 
name="line.1314"></a>
+<span class="sourceLineNo">1315</span>  ////////////////////////<a 
name="line.1315"></a>
+<span class="sourceLineNo">1316</span><a name="line.1316"></a>
+<span class="sourceLineNo">1317</span>  /**<a name="line.1317"></a>
+<span class="sourceLineNo">1318</span>   * Generates and returns a Put 
containing the region into for the catalog table<a name="line.1318"></a>
+<span class="sourceLineNo">1319</span>   */<a name="line.1319"></a>
+<span class="sourceLineNo">1320</span>  public static Put 
makePutFromRegionInfo(RegionInfo regionInfo) throws IOException {<a 
name="line.1320"></a>
+<span class="sourceLineNo">1321</span>    return 
makePutFromRegionInfo(regionInfo, EnvironmentEdgeManager.currentTime());<a 
name="line.1321"></a>
+<span class="sourceLineNo">1322</span>  }<a name="line.1322"></a>
+<span class="sourceLineNo">1323</span><a name="line.1323"></a>
+<span class="sourceLineNo">1324</span>  /**<a name="line.1324"></a>
+<span class="sourceLineNo">1325</span>   * Generates and returns a Put 
containing the region into for the catalog table<a name="line.1325"></a>
+<span class="sourceLineNo">1326</span>   */<a name="line.1326"></a>
+<span class="sourceLineNo">1327</span>  public static Put 
makePutFromRegionInfo(RegionInfo regionInfo, long ts) throws IOException {<a 
name="line.1327"></a>
+<span class="sourceLineNo">1328</span>    Put put = new 
Put(regionInfo.getRegionName(), ts);<a name="line.1328"></a>
+<span class="sourceLineNo">1329</span>    addRegionInfo(put, regionInfo);<a 
name="line.1329"></a>
+<span class="sourceLineNo">1330</span>    return put;<a name="line.1330"></a>
+<span class="sourceLineNo">1331</span>  }<a name="line.1331"></a>
+<span class="sourceLineNo">1332</span><a name="line.1332"></a>
+<span class="sourceLineNo">1333</span>  /**<a name="line.1333"></a>
+<span class="sourceLineNo">1334</span>   * Generates and returns a Delete 
containing the region info for the catalog<a name="line.1334"></a>
+<span class="sourceLineNo">1335</span>   * table<a name="line.1335"></a>
+<span class="sourceLineNo">1336</span>   */<a name="line.1336"></a>
+<span class="sourceLineNo">1337</span>  public static Delete 
makeDeleteFromRegionInfo(RegionInfo regionInfo) {<a name="line.1337"></a>
+<span class="sourceLineNo">1338</span>    long now = 
EnvironmentEdgeManager.currentTime();<a name="line.1338"></a>
+<span class="sourceLineNo">1339</span>    return 
makeDeleteFromRegionInfo(regionInfo, now);<a name="line.1339"></a>
+<span class="sourceLineNo">1340</span>  }<a name="line.1340"></a>
+<span class="sourceLineNo">1341</span><a name="line.1341"></a>
+<span class="sourceLineNo">1342</span>  /**<a name="line.1342"></a>
+<span class="sourceLineNo">1343</span>   * Generates and returns a Delete 
containing the region info for the catalog<a name="line.1343"></a>
+<span class="sourceLineNo">1344</span>   * table<a name="line.1344"></a>
+<span class="sourceLineNo">1345</span>   */<a name="line.1345"></a>
+<span class="sourceLineNo">1346</span>  public static Delete 
makeDeleteFromRegionInfo(RegionInfo regionInfo, long ts) {<a 
name="line.1346"></a>
+<span class="sourceLineNo">1347</span>    if (regionInfo == null) {<a 
name="line.1347"></a>
+<span class="sourceLineNo">1348</span>      throw new 
IllegalArgumentException("Can't make a delete for null region");<a 
name="line.1348"></a>
+<span class="sourceLineNo">1349</span>    }<a name="line.1349"></a>
+<span class="sourceLineNo">1350</span>    Delete delete = new 
Delete(regionInfo.getRegionName());<a name="line.1350"></a>
+<span class="sourceLineNo">1351</span>    delete.addFamily(getCatalogFamily(), 
ts);<a name="line.1351"></a>
+<span class="sourceLineNo">1352</span>    return delete;<a 
name="line.1352"></a>
+<span class="sourceLineNo">1353</span>  }<a name="line.1353"></a>
+<span class="sourceLineNo">1354</span><a name="line.1354"></a>
+<span class="sourceLineNo">1355</span>  public static Put 
makeBarrierPut(byte[] encodedRegionName, long seq, byte[] tableName)<a 
name="line.1355"></a>
+<span class="sourceLineNo">1356</span>      throws IOException {<a 
name="line.1356"></a>
+<span class="sourceLineNo">1357</span>    byte[] seqBytes = 
Bytes.toBytes(seq);<a name="line.1357"></a>
+<span class="sourceLineNo">1358</span>    Put put = new 
Put(encodedRegionName);<a name="line.1358"></a>
+<span class="sourceLineNo">1359</span>    
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a 
name="line.1359"></a>
+<span class="sourceLineNo">1360</span>            .setRow(put.getRow())<a 
name="line.1360"></a>
+<span clas

<TRUNCATED>

Reply via email to