hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [43/51] [partial] hbase-site git commit: Published site at 9ee0cbb995c1d7de905f4138a199f115762725e8.
Date Mon, 09 May 2016 16:51:26 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/33c287c2/apidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html b/apidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html
index eaae149..18172d6 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html
@@ -134,157 +134,173 @@
 <span class="sourceLineNo">126</span>      }<a name="line.126"></a>
 <span class="sourceLineNo">127</span>    } else {<a name="line.127"></a>
 <span class="sourceLineNo">128</span>      try {<a name="line.128"></a>
-<span class="sourceLineNo">129</span>        scan = new Scan();<a name="line.129"></a>
-<span class="sourceLineNo">130</span><a name="line.130"></a>
-<span class="sourceLineNo">131</span>        if (conf.get(SCAN_ROW_START) !=
null) {<a name="line.131"></a>
-<span class="sourceLineNo">132</span>          scan.setStartRow(Bytes.toBytesBinary(conf.get(SCAN_ROW_START)));<a
name="line.132"></a>
-<span class="sourceLineNo">133</span>        }<a name="line.133"></a>
+<span class="sourceLineNo">129</span>        scan = createScanFromConfiguration(conf);<a
name="line.129"></a>
+<span class="sourceLineNo">130</span>      } catch (Exception e) {<a name="line.130"></a>
+<span class="sourceLineNo">131</span>          LOG.error(StringUtils.stringifyException(e));<a
name="line.131"></a>
+<span class="sourceLineNo">132</span>      }<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    }<a name="line.133"></a>
 <span class="sourceLineNo">134</span><a name="line.134"></a>
-<span class="sourceLineNo">135</span>        if (conf.get(SCAN_ROW_STOP) != null)
{<a name="line.135"></a>
-<span class="sourceLineNo">136</span>          scan.setStopRow(Bytes.toBytesBinary(conf.get(SCAN_ROW_STOP)));<a
name="line.136"></a>
-<span class="sourceLineNo">137</span>        }<a name="line.137"></a>
-<span class="sourceLineNo">138</span><a name="line.138"></a>
-<span class="sourceLineNo">139</span>        if (conf.get(SCAN_COLUMNS) != null)
{<a name="line.139"></a>
-<span class="sourceLineNo">140</span>          addColumns(scan, conf.get(SCAN_COLUMNS));<a
name="line.140"></a>
-<span class="sourceLineNo">141</span>        }<a name="line.141"></a>
-<span class="sourceLineNo">142</span><a name="line.142"></a>
-<span class="sourceLineNo">143</span>        if (conf.get(SCAN_COLUMN_FAMILY)
!= null) {<a name="line.143"></a>
-<span class="sourceLineNo">144</span>          scan.addFamily(Bytes.toBytes(conf.get(SCAN_COLUMN_FAMILY)));<a
name="line.144"></a>
-<span class="sourceLineNo">145</span>        }<a name="line.145"></a>
-<span class="sourceLineNo">146</span><a name="line.146"></a>
-<span class="sourceLineNo">147</span>        if (conf.get(SCAN_TIMESTAMP) !=
null) {<a name="line.147"></a>
-<span class="sourceLineNo">148</span>          scan.setTimeStamp(Long.parseLong(conf.get(SCAN_TIMESTAMP)));<a
name="line.148"></a>
-<span class="sourceLineNo">149</span>        }<a name="line.149"></a>
+<span class="sourceLineNo">135</span>    setScan(scan);<a name="line.135"></a>
+<span class="sourceLineNo">136</span>  }<a name="line.136"></a>
+<span class="sourceLineNo">137</span><a name="line.137"></a>
+<span class="sourceLineNo">138</span>  /**<a name="line.138"></a>
+<span class="sourceLineNo">139</span>   * Sets up a {@link Scan} instance, applying
settings from the configuration property<a name="line.139"></a>
+<span class="sourceLineNo">140</span>   * constants defined in {@code TableInputFormat}.
 This allows specifying things such as:<a name="line.140"></a>
+<span class="sourceLineNo">141</span>   * &lt;ul&gt;<a name="line.141"></a>
+<span class="sourceLineNo">142</span>   *   &lt;li&gt;start and stop
rows&lt;/li&gt;<a name="line.142"></a>
+<span class="sourceLineNo">143</span>   *   &lt;li&gt;column qualifiers
or families&lt;/li&gt;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>   *   &lt;li&gt;timestamps or timerange&lt;/li&gt;<a
name="line.144"></a>
+<span class="sourceLineNo">145</span>   *   &lt;li&gt;scanner caching
and batch size&lt;/li&gt;<a name="line.145"></a>
+<span class="sourceLineNo">146</span>   * &lt;/ul&gt;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>   */<a name="line.147"></a>
+<span class="sourceLineNo">148</span>  public static Scan createScanFromConfiguration(Configuration
conf) throws IOException {<a name="line.148"></a>
+<span class="sourceLineNo">149</span>    Scan scan = new Scan();<a name="line.149"></a>
 <span class="sourceLineNo">150</span><a name="line.150"></a>
-<span class="sourceLineNo">151</span>        if (conf.get(SCAN_TIMERANGE_START)
!= null &amp;&amp; conf.get(SCAN_TIMERANGE_END) != null) {<a name="line.151"></a>
-<span class="sourceLineNo">152</span>          scan.setTimeRange(<a name="line.152"></a>
-<span class="sourceLineNo">153</span>              Long.parseLong(conf.get(SCAN_TIMERANGE_START)),<a
name="line.153"></a>
-<span class="sourceLineNo">154</span>              Long.parseLong(conf.get(SCAN_TIMERANGE_END)));<a
name="line.154"></a>
-<span class="sourceLineNo">155</span>        }<a name="line.155"></a>
-<span class="sourceLineNo">156</span><a name="line.156"></a>
-<span class="sourceLineNo">157</span>        if (conf.get(SCAN_MAXVERSIONS) !=
null) {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>          scan.setMaxVersions(Integer.parseInt(conf.get(SCAN_MAXVERSIONS)));<a
name="line.158"></a>
-<span class="sourceLineNo">159</span>        }<a name="line.159"></a>
-<span class="sourceLineNo">160</span><a name="line.160"></a>
-<span class="sourceLineNo">161</span>        if (conf.get(SCAN_CACHEDROWS) !=
null) {<a name="line.161"></a>
-<span class="sourceLineNo">162</span>          scan.setCaching(Integer.parseInt(conf.get(SCAN_CACHEDROWS)));<a
name="line.162"></a>
-<span class="sourceLineNo">163</span>        }<a name="line.163"></a>
-<span class="sourceLineNo">164</span><a name="line.164"></a>
-<span class="sourceLineNo">165</span>        if (conf.get(SCAN_BATCHSIZE) !=
null) {<a name="line.165"></a>
-<span class="sourceLineNo">166</span>          scan.setBatch(Integer.parseInt(conf.get(SCAN_BATCHSIZE)));<a
name="line.166"></a>
-<span class="sourceLineNo">167</span>        }<a name="line.167"></a>
-<span class="sourceLineNo">168</span><a name="line.168"></a>
-<span class="sourceLineNo">169</span>        // false by default, full table
scans generate too much BC churn<a name="line.169"></a>
-<span class="sourceLineNo">170</span>        scan.setCacheBlocks((conf.getBoolean(SCAN_CACHEBLOCKS,
false)));<a name="line.170"></a>
-<span class="sourceLineNo">171</span>      } catch (Exception e) {<a name="line.171"></a>
-<span class="sourceLineNo">172</span>          LOG.error(StringUtils.stringifyException(e));<a
name="line.172"></a>
-<span class="sourceLineNo">173</span>      }<a name="line.173"></a>
-<span class="sourceLineNo">174</span>    }<a name="line.174"></a>
-<span class="sourceLineNo">175</span><a name="line.175"></a>
-<span class="sourceLineNo">176</span>    setScan(scan);<a name="line.176"></a>
-<span class="sourceLineNo">177</span>  }<a name="line.177"></a>
-<span class="sourceLineNo">178</span><a name="line.178"></a>
-<span class="sourceLineNo">179</span>  @Override<a name="line.179"></a>
-<span class="sourceLineNo">180</span>  protected void initialize(JobContext context)
throws IOException {<a name="line.180"></a>
-<span class="sourceLineNo">181</span>    // Do we have to worry about mis-matches
between the Configuration from setConf and the one<a name="line.181"></a>
-<span class="sourceLineNo">182</span>    // in this context?<a name="line.182"></a>
-<span class="sourceLineNo">183</span>    TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE));<a
name="line.183"></a>
-<span class="sourceLineNo">184</span>    try {<a name="line.184"></a>
-<span class="sourceLineNo">185</span>      initializeTable(ConnectionFactory.createConnection(new
Configuration(conf)), tableName);<a name="line.185"></a>
-<span class="sourceLineNo">186</span>    } catch (Exception e) {<a name="line.186"></a>
-<span class="sourceLineNo">187</span>      LOG.error(StringUtils.stringifyException(e));<a
name="line.187"></a>
-<span class="sourceLineNo">188</span>    }<a name="line.188"></a>
-<span class="sourceLineNo">189</span>  }<a name="line.189"></a>
-<span class="sourceLineNo">190</span><a name="line.190"></a>
-<span class="sourceLineNo">191</span>  /**<a name="line.191"></a>
-<span class="sourceLineNo">192</span>   * Parses a combined family and qualifier
and adds either both or just the<a name="line.192"></a>
-<span class="sourceLineNo">193</span>   * family in case there is no qualifier.
This assumes the older colon<a name="line.193"></a>
-<span class="sourceLineNo">194</span>   * divided notation, e.g. "family:qualifier".<a
name="line.194"></a>
-<span class="sourceLineNo">195</span>   *<a name="line.195"></a>
-<span class="sourceLineNo">196</span>   * @param scan The Scan to update.<a
name="line.196"></a>
-<span class="sourceLineNo">197</span>   * @param familyAndQualifier family and
qualifier<a name="line.197"></a>
-<span class="sourceLineNo">198</span>   * @throws IllegalArgumentException When
familyAndQualifier is invalid.<a name="line.198"></a>
-<span class="sourceLineNo">199</span>   */<a name="line.199"></a>
-<span class="sourceLineNo">200</span>  private static void addColumn(Scan scan,
byte[] familyAndQualifier) {<a name="line.200"></a>
-<span class="sourceLineNo">201</span>    byte [][] fq = KeyValue.parseColumn(familyAndQualifier);<a
name="line.201"></a>
-<span class="sourceLineNo">202</span>    if (fq.length == 1) {<a name="line.202"></a>
-<span class="sourceLineNo">203</span>      scan.addFamily(fq[0]);<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    } else if (fq.length == 2) {<a name="line.204"></a>
-<span class="sourceLineNo">205</span>      scan.addColumn(fq[0], fq[1]);<a
name="line.205"></a>
-<span class="sourceLineNo">206</span>    } else {<a name="line.206"></a>
-<span class="sourceLineNo">207</span>      throw new IllegalArgumentException("Invalid
familyAndQualifier provided.");<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    }<a name="line.208"></a>
-<span class="sourceLineNo">209</span>  }<a name="line.209"></a>
-<span class="sourceLineNo">210</span><a name="line.210"></a>
-<span class="sourceLineNo">211</span>  /**<a name="line.211"></a>
-<span class="sourceLineNo">212</span>   * Adds an array of columns specified
using old format, family:qualifier.<a name="line.212"></a>
-<span class="sourceLineNo">213</span>   * &lt;p&gt;<a name="line.213"></a>
-<span class="sourceLineNo">214</span>   * Overrides previous calls to {@link
Scan#addColumn(byte[], byte[])}for any families in the<a name="line.214"></a>
-<span class="sourceLineNo">215</span>   * input.<a name="line.215"></a>
-<span class="sourceLineNo">216</span>   *<a name="line.216"></a>
-<span class="sourceLineNo">217</span>   * @param scan The Scan to update.<a
name="line.217"></a>
-<span class="sourceLineNo">218</span>   * @param columns array of columns, formatted
as &lt;code&gt;family:qualifier&lt;/code&gt;<a name="line.218"></a>
-<span class="sourceLineNo">219</span>   * @see Scan#addColumn(byte[], byte[])<a
name="line.219"></a>
-<span class="sourceLineNo">220</span>   */<a name="line.220"></a>
-<span class="sourceLineNo">221</span>  public static void addColumns(Scan scan,
byte [][] columns) {<a name="line.221"></a>
-<span class="sourceLineNo">222</span>    for (byte[] column : columns) {<a
name="line.222"></a>
-<span class="sourceLineNo">223</span>      addColumn(scan, column);<a name="line.223"></a>
+<span class="sourceLineNo">151</span>    if (conf.get(SCAN_ROW_START) != null)
{<a name="line.151"></a>
+<span class="sourceLineNo">152</span>      scan.setStartRow(Bytes.toBytesBinary(conf.get(SCAN_ROW_START)));<a
name="line.152"></a>
+<span class="sourceLineNo">153</span>    }<a name="line.153"></a>
+<span class="sourceLineNo">154</span><a name="line.154"></a>
+<span class="sourceLineNo">155</span>    if (conf.get(SCAN_ROW_STOP) != null)
{<a name="line.155"></a>
+<span class="sourceLineNo">156</span>      scan.setStopRow(Bytes.toBytesBinary(conf.get(SCAN_ROW_STOP)));<a
name="line.156"></a>
+<span class="sourceLineNo">157</span>    }<a name="line.157"></a>
+<span class="sourceLineNo">158</span><a name="line.158"></a>
+<span class="sourceLineNo">159</span>    if (conf.get(SCAN_COLUMNS) != null)
{<a name="line.159"></a>
+<span class="sourceLineNo">160</span>      addColumns(scan, conf.get(SCAN_COLUMNS));<a
name="line.160"></a>
+<span class="sourceLineNo">161</span>    }<a name="line.161"></a>
+<span class="sourceLineNo">162</span><a name="line.162"></a>
+<span class="sourceLineNo">163</span>    if (conf.get(SCAN_COLUMN_FAMILY) !=
null) {<a name="line.163"></a>
+<span class="sourceLineNo">164</span>      scan.addFamily(Bytes.toBytes(conf.get(SCAN_COLUMN_FAMILY)));<a
name="line.164"></a>
+<span class="sourceLineNo">165</span>    }<a name="line.165"></a>
+<span class="sourceLineNo">166</span><a name="line.166"></a>
+<span class="sourceLineNo">167</span>    if (conf.get(SCAN_TIMESTAMP) != null)
{<a name="line.167"></a>
+<span class="sourceLineNo">168</span>      scan.setTimeStamp(Long.parseLong(conf.get(SCAN_TIMESTAMP)));<a
name="line.168"></a>
+<span class="sourceLineNo">169</span>    }<a name="line.169"></a>
+<span class="sourceLineNo">170</span><a name="line.170"></a>
+<span class="sourceLineNo">171</span>    if (conf.get(SCAN_TIMERANGE_START) !=
null &amp;&amp; conf.get(SCAN_TIMERANGE_END) != null) {<a name="line.171"></a>
+<span class="sourceLineNo">172</span>      scan.setTimeRange(<a name="line.172"></a>
+<span class="sourceLineNo">173</span>          Long.parseLong(conf.get(SCAN_TIMERANGE_START)),<a
name="line.173"></a>
+<span class="sourceLineNo">174</span>          Long.parseLong(conf.get(SCAN_TIMERANGE_END)));<a
name="line.174"></a>
+<span class="sourceLineNo">175</span>    }<a name="line.175"></a>
+<span class="sourceLineNo">176</span><a name="line.176"></a>
+<span class="sourceLineNo">177</span>    if (conf.get(SCAN_MAXVERSIONS) != null)
{<a name="line.177"></a>
+<span class="sourceLineNo">178</span>      scan.setMaxVersions(Integer.parseInt(conf.get(SCAN_MAXVERSIONS)));<a
name="line.178"></a>
+<span class="sourceLineNo">179</span>    }<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>    if (conf.get(SCAN_CACHEDROWS) != null)
{<a name="line.181"></a>
+<span class="sourceLineNo">182</span>      scan.setCaching(Integer.parseInt(conf.get(SCAN_CACHEDROWS)));<a
name="line.182"></a>
+<span class="sourceLineNo">183</span>    }<a name="line.183"></a>
+<span class="sourceLineNo">184</span><a name="line.184"></a>
+<span class="sourceLineNo">185</span>    if (conf.get(SCAN_BATCHSIZE) != null)
{<a name="line.185"></a>
+<span class="sourceLineNo">186</span>      scan.setBatch(Integer.parseInt(conf.get(SCAN_BATCHSIZE)));<a
name="line.186"></a>
+<span class="sourceLineNo">187</span>    }<a name="line.187"></a>
+<span class="sourceLineNo">188</span><a name="line.188"></a>
+<span class="sourceLineNo">189</span>    // false by default, full table scans
generate too much BC churn<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    scan.setCacheBlocks((conf.getBoolean(SCAN_CACHEBLOCKS,
false)));<a name="line.190"></a>
+<span class="sourceLineNo">191</span><a name="line.191"></a>
+<span class="sourceLineNo">192</span>    return scan;<a name="line.192"></a>
+<span class="sourceLineNo">193</span>  }<a name="line.193"></a>
+<span class="sourceLineNo">194</span><a name="line.194"></a>
+<span class="sourceLineNo">195</span>  @Override<a name="line.195"></a>
+<span class="sourceLineNo">196</span>  protected void initialize(JobContext context)
throws IOException {<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    // Do we have to worry about mis-matches
between the Configuration from setConf and the one<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    // in this context?<a name="line.198"></a>
+<span class="sourceLineNo">199</span>    TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE));<a
name="line.199"></a>
+<span class="sourceLineNo">200</span>    try {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>      initializeTable(ConnectionFactory.createConnection(new
Configuration(conf)), tableName);<a name="line.201"></a>
+<span class="sourceLineNo">202</span>    } catch (Exception e) {<a name="line.202"></a>
+<span class="sourceLineNo">203</span>      LOG.error(StringUtils.stringifyException(e));<a
name="line.203"></a>
+<span class="sourceLineNo">204</span>    }<a name="line.204"></a>
+<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
+<span class="sourceLineNo">206</span><a name="line.206"></a>
+<span class="sourceLineNo">207</span>  /**<a name="line.207"></a>
+<span class="sourceLineNo">208</span>   * Parses a combined family and qualifier
and adds either both or just the<a name="line.208"></a>
+<span class="sourceLineNo">209</span>   * family in case there is no qualifier.
This assumes the older colon<a name="line.209"></a>
+<span class="sourceLineNo">210</span>   * divided notation, e.g. "family:qualifier".<a
name="line.210"></a>
+<span class="sourceLineNo">211</span>   *<a name="line.211"></a>
+<span class="sourceLineNo">212</span>   * @param scan The Scan to update.<a
name="line.212"></a>
+<span class="sourceLineNo">213</span>   * @param familyAndQualifier family and
qualifier<a name="line.213"></a>
+<span class="sourceLineNo">214</span>   * @throws IllegalArgumentException When
familyAndQualifier is invalid.<a name="line.214"></a>
+<span class="sourceLineNo">215</span>   */<a name="line.215"></a>
+<span class="sourceLineNo">216</span>  private static void addColumn(Scan scan,
byte[] familyAndQualifier) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    byte [][] fq = KeyValue.parseColumn(familyAndQualifier);<a
name="line.217"></a>
+<span class="sourceLineNo">218</span>    if (fq.length == 1) {<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      scan.addFamily(fq[0]);<a name="line.219"></a>
+<span class="sourceLineNo">220</span>    } else if (fq.length == 2) {<a name="line.220"></a>
+<span class="sourceLineNo">221</span>      scan.addColumn(fq[0], fq[1]);<a
name="line.221"></a>
+<span class="sourceLineNo">222</span>    } else {<a name="line.222"></a>
+<span class="sourceLineNo">223</span>      throw new IllegalArgumentException("Invalid
familyAndQualifier provided.");<a name="line.223"></a>
 <span class="sourceLineNo">224</span>    }<a name="line.224"></a>
 <span class="sourceLineNo">225</span>  }<a name="line.225"></a>
 <span class="sourceLineNo">226</span><a name="line.226"></a>
 <span class="sourceLineNo">227</span>  /**<a name="line.227"></a>
-<span class="sourceLineNo">228</span>   * Calculates the splits that will serve
as input for the map tasks. The<a name="line.228"></a>
-<span class="sourceLineNo">229</span>   * number of splits matches the number
of regions in a table. Splits are shuffled if<a name="line.229"></a>
-<span class="sourceLineNo">230</span>   * required.<a name="line.230"></a>
-<span class="sourceLineNo">231</span>   * @param context  The current job context.<a
name="line.231"></a>
-<span class="sourceLineNo">232</span>   * @return The list of input splits.<a
name="line.232"></a>
-<span class="sourceLineNo">233</span>   * @throws IOException When creating the
list of splits fails.<a name="line.233"></a>
-<span class="sourceLineNo">234</span>   * @see org.apache.hadoop.mapreduce.InputFormat#getSplits(<a
name="line.234"></a>
-<span class="sourceLineNo">235</span>   *   org.apache.hadoop.mapreduce.JobContext)<a
name="line.235"></a>
+<span class="sourceLineNo">228</span>   * Adds an array of columns specified
using old format, family:qualifier.<a name="line.228"></a>
+<span class="sourceLineNo">229</span>   * &lt;p&gt;<a name="line.229"></a>
+<span class="sourceLineNo">230</span>   * Overrides previous calls to {@link
Scan#addColumn(byte[], byte[])}for any families in the<a name="line.230"></a>
+<span class="sourceLineNo">231</span>   * input.<a name="line.231"></a>
+<span class="sourceLineNo">232</span>   *<a name="line.232"></a>
+<span class="sourceLineNo">233</span>   * @param scan The Scan to update.<a
name="line.233"></a>
+<span class="sourceLineNo">234</span>   * @param columns array of columns, formatted
as &lt;code&gt;family:qualifier&lt;/code&gt;<a name="line.234"></a>
+<span class="sourceLineNo">235</span>   * @see Scan#addColumn(byte[], byte[])<a
name="line.235"></a>
 <span class="sourceLineNo">236</span>   */<a name="line.236"></a>
-<span class="sourceLineNo">237</span>  @Override<a name="line.237"></a>
-<span class="sourceLineNo">238</span>  public List&lt;InputSplit&gt;
getSplits(JobContext context) throws IOException {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>    List&lt;InputSplit&gt; splits
= super.getSplits(context);<a name="line.239"></a>
-<span class="sourceLineNo">240</span>    if ((conf.get(SHUFFLE_MAPS) != null)
&amp;&amp; "true".equals(conf.get(SHUFFLE_MAPS).toLowerCase())) {<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      Collections.shuffle(splits);<a
name="line.241"></a>
-<span class="sourceLineNo">242</span>    }<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    return splits;<a name="line.243"></a>
-<span class="sourceLineNo">244</span>  }<a name="line.244"></a>
-<span class="sourceLineNo">245</span><a name="line.245"></a>
-<span class="sourceLineNo">246</span>  /**<a name="line.246"></a>
-<span class="sourceLineNo">247</span>   * Convenience method to parse a string
representation of an array of column specifiers.<a name="line.247"></a>
-<span class="sourceLineNo">248</span>   *<a name="line.248"></a>
-<span class="sourceLineNo">249</span>   * @param scan The Scan to update.<a
name="line.249"></a>
-<span class="sourceLineNo">250</span>   * @param columns  The columns to parse.<a
name="line.250"></a>
-<span class="sourceLineNo">251</span>   */<a name="line.251"></a>
-<span class="sourceLineNo">252</span>  private static void addColumns(Scan scan,
String columns) {<a name="line.252"></a>
-<span class="sourceLineNo">253</span>    String[] cols = columns.split(" ");<a
name="line.253"></a>
-<span class="sourceLineNo">254</span>    for (String col : cols) {<a name="line.254"></a>
-<span class="sourceLineNo">255</span>      addColumn(scan, Bytes.toBytes(col));<a
name="line.255"></a>
-<span class="sourceLineNo">256</span>    }<a name="line.256"></a>
-<span class="sourceLineNo">257</span>  }<a name="line.257"></a>
-<span class="sourceLineNo">258</span><a name="line.258"></a>
-<span class="sourceLineNo">259</span>  @Override<a name="line.259"></a>
-<span class="sourceLineNo">260</span>  protected Pair&lt;byte[][], byte[][]&gt;
getStartEndKeys() throws IOException {<a name="line.260"></a>
-<span class="sourceLineNo">261</span>    if (conf.get(SPLIT_TABLE) != null) {<a
name="line.261"></a>
-<span class="sourceLineNo">262</span>      TableName splitTableName = TableName.valueOf(conf.get(SPLIT_TABLE));<a
name="line.262"></a>
-<span class="sourceLineNo">263</span>      try (Connection conn = ConnectionFactory.createConnection(getConf()))
{<a name="line.263"></a>
-<span class="sourceLineNo">264</span>        try (RegionLocator rl = conn.getRegionLocator(splitTableName))
{<a name="line.264"></a>
-<span class="sourceLineNo">265</span>          return rl.getStartEndKeys();<a
name="line.265"></a>
-<span class="sourceLineNo">266</span>        }<a name="line.266"></a>
-<span class="sourceLineNo">267</span>      }<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    }<a name="line.268"></a>
-<span class="sourceLineNo">269</span><a name="line.269"></a>
-<span class="sourceLineNo">270</span>    return super.getStartEndKeys();<a
name="line.270"></a>
-<span class="sourceLineNo">271</span>  }<a name="line.271"></a>
-<span class="sourceLineNo">272</span><a name="line.272"></a>
-<span class="sourceLineNo">273</span>  /**<a name="line.273"></a>
-<span class="sourceLineNo">274</span>   * Sets split table in map-reduce job.<a
name="line.274"></a>
-<span class="sourceLineNo">275</span>   */<a name="line.275"></a>
-<span class="sourceLineNo">276</span>  public static void configureSplitTable(Job
job, TableName tableName) {<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    job.getConfiguration().set(SPLIT_TABLE,
tableName.getNameAsString());<a name="line.277"></a>
-<span class="sourceLineNo">278</span>  }<a name="line.278"></a>
-<span class="sourceLineNo">279</span>}<a name="line.279"></a>
+<span class="sourceLineNo">237</span>  public static void addColumns(Scan scan,
byte [][] columns) {<a name="line.237"></a>
+<span class="sourceLineNo">238</span>    for (byte[] column : columns) {<a
name="line.238"></a>
+<span class="sourceLineNo">239</span>      addColumn(scan, column);<a name="line.239"></a>
+<span class="sourceLineNo">240</span>    }<a name="line.240"></a>
+<span class="sourceLineNo">241</span>  }<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>  /**<a name="line.243"></a>
+<span class="sourceLineNo">244</span>   * Calculates the splits that will serve
as input for the map tasks. The<a name="line.244"></a>
+<span class="sourceLineNo">245</span>   * number of splits matches the number
of regions in a table. Splits are shuffled if<a name="line.245"></a>
+<span class="sourceLineNo">246</span>   * required.<a name="line.246"></a>
+<span class="sourceLineNo">247</span>   * @param context  The current job context.<a
name="line.247"></a>
+<span class="sourceLineNo">248</span>   * @return The list of input splits.<a
name="line.248"></a>
+<span class="sourceLineNo">249</span>   * @throws IOException When creating the
list of splits fails.<a name="line.249"></a>
+<span class="sourceLineNo">250</span>   * @see org.apache.hadoop.mapreduce.InputFormat#getSplits(<a
name="line.250"></a>
+<span class="sourceLineNo">251</span>   *   org.apache.hadoop.mapreduce.JobContext)<a
name="line.251"></a>
+<span class="sourceLineNo">252</span>   */<a name="line.252"></a>
+<span class="sourceLineNo">253</span>  @Override<a name="line.253"></a>
+<span class="sourceLineNo">254</span>  public List&lt;InputSplit&gt;
getSplits(JobContext context) throws IOException {<a name="line.254"></a>
+<span class="sourceLineNo">255</span>    List&lt;InputSplit&gt; splits
= super.getSplits(context);<a name="line.255"></a>
+<span class="sourceLineNo">256</span>    if ((conf.get(SHUFFLE_MAPS) != null)
&amp;&amp; "true".equals(conf.get(SHUFFLE_MAPS).toLowerCase())) {<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      Collections.shuffle(splits);<a
name="line.257"></a>
+<span class="sourceLineNo">258</span>    }<a name="line.258"></a>
+<span class="sourceLineNo">259</span>    return splits;<a name="line.259"></a>
+<span class="sourceLineNo">260</span>  }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>  /**<a name="line.262"></a>
+<span class="sourceLineNo">263</span>   * Convenience method to parse a string
representation of an array of column specifiers.<a name="line.263"></a>
+<span class="sourceLineNo">264</span>   *<a name="line.264"></a>
+<span class="sourceLineNo">265</span>   * @param scan The Scan to update.<a
name="line.265"></a>
+<span class="sourceLineNo">266</span>   * @param columns  The columns to parse.<a
name="line.266"></a>
+<span class="sourceLineNo">267</span>   */<a name="line.267"></a>
+<span class="sourceLineNo">268</span>  private static void addColumns(Scan scan,
String columns) {<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    String[] cols = columns.split(" ");<a
name="line.269"></a>
+<span class="sourceLineNo">270</span>    for (String col : cols) {<a name="line.270"></a>
+<span class="sourceLineNo">271</span>      addColumn(scan, Bytes.toBytes(col));<a
name="line.271"></a>
+<span class="sourceLineNo">272</span>    }<a name="line.272"></a>
+<span class="sourceLineNo">273</span>  }<a name="line.273"></a>
+<span class="sourceLineNo">274</span><a name="line.274"></a>
+<span class="sourceLineNo">275</span>  @Override<a name="line.275"></a>
+<span class="sourceLineNo">276</span>  protected Pair&lt;byte[][], byte[][]&gt;
getStartEndKeys() throws IOException {<a name="line.276"></a>
+<span class="sourceLineNo">277</span>    if (conf.get(SPLIT_TABLE) != null) {<a
name="line.277"></a>
+<span class="sourceLineNo">278</span>      TableName splitTableName = TableName.valueOf(conf.get(SPLIT_TABLE));<a
name="line.278"></a>
+<span class="sourceLineNo">279</span>      try (Connection conn = ConnectionFactory.createConnection(getConf()))
{<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        try (RegionLocator rl = conn.getRegionLocator(splitTableName))
{<a name="line.280"></a>
+<span class="sourceLineNo">281</span>          return rl.getStartEndKeys();<a
name="line.281"></a>
+<span class="sourceLineNo">282</span>        }<a name="line.282"></a>
+<span class="sourceLineNo">283</span>      }<a name="line.283"></a>
+<span class="sourceLineNo">284</span>    }<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>    return super.getStartEndKeys();<a
name="line.286"></a>
+<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>  /**<a name="line.289"></a>
+<span class="sourceLineNo">290</span>   * Sets split table in map-reduce job.<a
name="line.290"></a>
+<span class="sourceLineNo">291</span>   */<a name="line.291"></a>
+<span class="sourceLineNo">292</span>  public static void configureSplitTable(Job
job, TableName tableName) {<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    job.getConfiguration().set(SPLIT_TABLE,
tableName.getNameAsString());<a name="line.293"></a>
+<span class="sourceLineNo">294</span>  }<a name="line.294"></a>
+<span class="sourceLineNo">295</span>}<a name="line.295"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/33c287c2/book.html
----------------------------------------------------------------------
diff --git a/book.html b/book.html
index 9d46d8b..a1fc5e1 100644
--- a/book.html
+++ b/book.html
@@ -33472,7 +33472,7 @@ The server will return cellblocks compressed using this same compressor
as long
 <div id="footer">
 <div id="footer-text">
 Version 2.0.0-SNAPSHOT<br>
-Last updated 2016-04-18 14:31:26 UTC
+Last updated 2016-04-08 14:30:12 UTC
 </div>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/33c287c2/bulk-loads.html
----------------------------------------------------------------------
diff --git a/bulk-loads.html b/bulk-loads.html
index 8266c45..583542f 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20160506" />
+    <meta name="Date-Revision-yyyymmdd" content="20160508" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Bulk Loads in Apache HBase (TM)
@@ -305,7 +305,7 @@ under the License. -->
                         <a href="http://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2016-05-06</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2016-05-08</li>
             </p>
                 </div>
 


Mime
View raw message