hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [05/51] [partial] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Tue, 11 Jul 2017 15:02:43 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.RegionOperationWithResult.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.RegionOperationWithResult.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.RegionOperationWithResult.html
index 25d6b70..635798d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.RegionOperationWithResult.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.RegionOperationWithResult.html
@@ -1234,540 +1234,541 @@
 <span class="sourceLineNo">1226</span>   * @param result the result returned by the append<a name="line.1226"></a>
 <span class="sourceLineNo">1227</span>   * @throws IOException if an error occurred on the coprocessor<a name="line.1227"></a>
 <span class="sourceLineNo">1228</span>   */<a name="line.1228"></a>
-<span class="sourceLineNo">1229</span>  public void postAppend(final Append append, final Result result) throws IOException {<a name="line.1229"></a>
-<span class="sourceLineNo">1230</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1230"></a>
-<span class="sourceLineNo">1231</span>      @Override<a name="line.1231"></a>
-<span class="sourceLineNo">1232</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1232"></a>
-<span class="sourceLineNo">1233</span>          throws IOException {<a name="line.1233"></a>
-<span class="sourceLineNo">1234</span>        oserver.postAppend(ctx, append, result);<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>  }<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>   * @param increment increment object<a name="line.1240"></a>
-<span class="sourceLineNo">1241</span>   * @param result the result returned by postIncrement<a name="line.1241"></a>
-<span class="sourceLineNo">1242</span>   * @throws IOException if an error occurred on the coprocessor<a name="line.1242"></a>
-<span class="sourceLineNo">1243</span>   */<a name="line.1243"></a>
-<span class="sourceLineNo">1244</span>  public Result postIncrement(final Increment increment, Result result) throws IOException {<a name="line.1244"></a>
-<span class="sourceLineNo">1245</span>    return execOperationWithResult(result,<a name="line.1245"></a>
-<span class="sourceLineNo">1246</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Result&gt;() {<a name="line.1246"></a>
-<span class="sourceLineNo">1247</span>      @Override<a name="line.1247"></a>
-<span class="sourceLineNo">1248</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1248"></a>
-<span class="sourceLineNo">1249</span>          throws IOException {<a name="line.1249"></a>
-<span class="sourceLineNo">1250</span>        setResult(oserver.postIncrement(ctx, increment, getResult()));<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 name="line.1255"></a>
-<span class="sourceLineNo">1256</span>   * @param scan the Scan specification<a name="line.1256"></a>
-<span class="sourceLineNo">1257</span>   * @return scanner id to return to client if default operation should be<a name="line.1257"></a>
-<span class="sourceLineNo">1258</span>   * bypassed, null otherwise<a name="line.1258"></a>
-<span class="sourceLineNo">1259</span>   * @exception IOException Exception<a name="line.1259"></a>
-<span class="sourceLineNo">1260</span>   */<a name="line.1260"></a>
-<span class="sourceLineNo">1261</span>  public RegionScanner preScannerOpen(final Scan scan) throws IOException {<a name="line.1261"></a>
-<span class="sourceLineNo">1262</span>    return execOperationWithResult(true, null,<a name="line.1262"></a>
-<span class="sourceLineNo">1263</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;RegionScanner&gt;() {<a name="line.1263"></a>
-<span class="sourceLineNo">1264</span>      @Override<a name="line.1264"></a>
-<span class="sourceLineNo">1265</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1265"></a>
-<span class="sourceLineNo">1266</span>          throws IOException {<a name="line.1266"></a>
-<span class="sourceLineNo">1267</span>        setResult(oserver.preScannerOpen(ctx, scan, getResult()));<a name="line.1267"></a>
-<span class="sourceLineNo">1268</span>      }<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><a name="line.1271"></a>
-<span class="sourceLineNo">1272</span>  /**<a name="line.1272"></a>
-<span class="sourceLineNo">1273</span>   * See<a name="line.1273"></a>
-<span class="sourceLineNo">1274</span>   * {@link RegionObserver#preStoreScannerOpen(ObserverContext,<a name="line.1274"></a>
-<span class="sourceLineNo">1275</span>   *    Store, Scan, NavigableSet, KeyValueScanner)}<a name="line.1275"></a>
-<span class="sourceLineNo">1276</span>   */<a name="line.1276"></a>
-<span class="sourceLineNo">1277</span>  public KeyValueScanner preStoreScannerOpen(final Store store, final Scan scan,<a name="line.1277"></a>
-<span class="sourceLineNo">1278</span>      final NavigableSet&lt;byte[]&gt; targetCols, final long readPt) throws IOException {<a name="line.1278"></a>
-<span class="sourceLineNo">1279</span>    return execOperationWithResult(null,<a name="line.1279"></a>
-<span class="sourceLineNo">1280</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;KeyValueScanner&gt;() {<a name="line.1280"></a>
-<span class="sourceLineNo">1281</span>      @Override<a name="line.1281"></a>
-<span class="sourceLineNo">1282</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1282"></a>
-<span class="sourceLineNo">1283</span>          throws IOException {<a name="line.1283"></a>
-<span class="sourceLineNo">1284</span>        setResult(oserver.preStoreScannerOpen(ctx, store, scan, targetCols, getResult(), readPt));<a name="line.1284"></a>
-<span class="sourceLineNo">1285</span>      }<a name="line.1285"></a>
-<span class="sourceLineNo">1286</span>    });<a name="line.1286"></a>
-<span class="sourceLineNo">1287</span>  }<a name="line.1287"></a>
-<span class="sourceLineNo">1288</span><a name="line.1288"></a>
-<span class="sourceLineNo">1289</span>  /**<a name="line.1289"></a>
-<span class="sourceLineNo">1290</span>   * @param scan the Scan specification<a name="line.1290"></a>
-<span class="sourceLineNo">1291</span>   * @param s the scanner<a name="line.1291"></a>
-<span class="sourceLineNo">1292</span>   * @return the scanner instance to use<a name="line.1292"></a>
-<span class="sourceLineNo">1293</span>   * @exception IOException Exception<a name="line.1293"></a>
-<span class="sourceLineNo">1294</span>   */<a name="line.1294"></a>
-<span class="sourceLineNo">1295</span>  public RegionScanner postScannerOpen(final Scan scan, RegionScanner s) throws IOException {<a name="line.1295"></a>
-<span class="sourceLineNo">1296</span>    return execOperationWithResult(s,<a name="line.1296"></a>
-<span class="sourceLineNo">1297</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;RegionScanner&gt;() {<a name="line.1297"></a>
-<span class="sourceLineNo">1298</span>      @Override<a name="line.1298"></a>
-<span class="sourceLineNo">1299</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1299"></a>
-<span class="sourceLineNo">1300</span>          throws IOException {<a name="line.1300"></a>
-<span class="sourceLineNo">1301</span>        setResult(oserver.postScannerOpen(ctx, scan, getResult()));<a name="line.1301"></a>
-<span class="sourceLineNo">1302</span>      }<a name="line.1302"></a>
-<span class="sourceLineNo">1303</span>    });<a name="line.1303"></a>
-<span class="sourceLineNo">1304</span>  }<a name="line.1304"></a>
-<span class="sourceLineNo">1305</span><a name="line.1305"></a>
-<span class="sourceLineNo">1306</span>  /**<a name="line.1306"></a>
-<span class="sourceLineNo">1307</span>   * @param s the scanner<a name="line.1307"></a>
-<span class="sourceLineNo">1308</span>   * @param results the result set returned by the region server<a name="line.1308"></a>
-<span class="sourceLineNo">1309</span>   * @param limit the maximum number of results to return<a name="line.1309"></a>
-<span class="sourceLineNo">1310</span>   * @return 'has next' indication to client if bypassing default behavior, or<a name="line.1310"></a>
-<span class="sourceLineNo">1311</span>   * null otherwise<a name="line.1311"></a>
-<span class="sourceLineNo">1312</span>   * @exception IOException Exception<a name="line.1312"></a>
-<span class="sourceLineNo">1313</span>   */<a name="line.1313"></a>
-<span class="sourceLineNo">1314</span>  public Boolean preScannerNext(final InternalScanner s,<a name="line.1314"></a>
-<span class="sourceLineNo">1315</span>      final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.1315"></a>
-<span class="sourceLineNo">1316</span>    return execOperationWithResult(true, false,<a name="line.1316"></a>
-<span class="sourceLineNo">1317</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1317"></a>
-<span class="sourceLineNo">1318</span>      @Override<a name="line.1318"></a>
-<span class="sourceLineNo">1319</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1319"></a>
-<span class="sourceLineNo">1320</span>          throws IOException {<a name="line.1320"></a>
-<span class="sourceLineNo">1321</span>        setResult(oserver.preScannerNext(ctx, s, results, limit, getResult()));<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><a name="line.1325"></a>
-<span class="sourceLineNo">1326</span>  /**<a name="line.1326"></a>
-<span class="sourceLineNo">1327</span>   * @param s the scanner<a name="line.1327"></a>
-<span class="sourceLineNo">1328</span>   * @param results the result set returned by the region server<a name="line.1328"></a>
-<span class="sourceLineNo">1329</span>   * @param limit the maximum number of results to return<a name="line.1329"></a>
-<span class="sourceLineNo">1330</span>   * @param hasMore<a name="line.1330"></a>
-<span class="sourceLineNo">1331</span>   * @return 'has more' indication to give to client<a name="line.1331"></a>
-<span class="sourceLineNo">1332</span>   * @exception IOException Exception<a name="line.1332"></a>
-<span class="sourceLineNo">1333</span>   */<a name="line.1333"></a>
-<span class="sourceLineNo">1334</span>  public boolean postScannerNext(final InternalScanner s,<a name="line.1334"></a>
-<span class="sourceLineNo">1335</span>      final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.1335"></a>
-<span class="sourceLineNo">1336</span>      throws IOException {<a name="line.1336"></a>
-<span class="sourceLineNo">1337</span>    return execOperationWithResult(hasMore,<a name="line.1337"></a>
-<span class="sourceLineNo">1338</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1338"></a>
-<span class="sourceLineNo">1339</span>      @Override<a name="line.1339"></a>
-<span class="sourceLineNo">1340</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1340"></a>
-<span class="sourceLineNo">1341</span>          throws IOException {<a name="line.1341"></a>
-<span class="sourceLineNo">1342</span>        setResult(oserver.postScannerNext(ctx, s, results, limit, getResult()));<a name="line.1342"></a>
-<span class="sourceLineNo">1343</span>      }<a name="line.1343"></a>
-<span class="sourceLineNo">1344</span>    });<a name="line.1344"></a>
-<span class="sourceLineNo">1345</span>  }<a name="line.1345"></a>
-<span class="sourceLineNo">1346</span><a name="line.1346"></a>
-<span class="sourceLineNo">1347</span>  /**<a name="line.1347"></a>
-<span class="sourceLineNo">1348</span>   * This will be called by the scan flow when the current scanned row is being filtered out by the<a name="line.1348"></a>
-<span class="sourceLineNo">1349</span>   * filter.<a name="line.1349"></a>
-<span class="sourceLineNo">1350</span>   * @param s the scanner<a name="line.1350"></a>
-<span class="sourceLineNo">1351</span>   * @param curRowCell The cell in the current row which got filtered out<a name="line.1351"></a>
-<span class="sourceLineNo">1352</span>   * @return whether more rows are available for the scanner or not<a name="line.1352"></a>
-<span class="sourceLineNo">1353</span>   * @throws IOException<a name="line.1353"></a>
-<span class="sourceLineNo">1354</span>   */<a name="line.1354"></a>
-<span class="sourceLineNo">1355</span>  public boolean postScannerFilterRow(final InternalScanner s, final Cell curRowCell)<a name="line.1355"></a>
-<span class="sourceLineNo">1356</span>      throws IOException {<a name="line.1356"></a>
-<span class="sourceLineNo">1357</span>    // short circuit for performance<a name="line.1357"></a>
-<span class="sourceLineNo">1358</span>    if (!hasCustomPostScannerFilterRow) return true;<a name="line.1358"></a>
-<span class="sourceLineNo">1359</span>    return execOperationWithResult(true,<a name="line.1359"></a>
-<span class="sourceLineNo">1360</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1360"></a>
-<span class="sourceLineNo">1361</span>      @Override<a name="line.1361"></a>
-<span class="sourceLineNo">1362</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1362"></a>
-<span class="sourceLineNo">1363</span>          throws IOException {<a name="line.1363"></a>
-<span class="sourceLineNo">1364</span>        setResult(oserver.postScannerFilterRow(ctx, s, curRowCell, getResult()));<a name="line.1364"></a>
-<span class="sourceLineNo">1365</span>      }<a name="line.1365"></a>
-<span class="sourceLineNo">1366</span>    });<a name="line.1366"></a>
-<span class="sourceLineNo">1367</span>  }<a name="line.1367"></a>
-<span class="sourceLineNo">1368</span><a name="line.1368"></a>
-<span class="sourceLineNo">1369</span>  /**<a name="line.1369"></a>
-<span class="sourceLineNo">1370</span>   * @param s the scanner<a name="line.1370"></a>
-<span class="sourceLineNo">1371</span>   * @return true if default behavior should be bypassed, false otherwise<a name="line.1371"></a>
-<span class="sourceLineNo">1372</span>   * @exception IOException Exception<a name="line.1372"></a>
-<span class="sourceLineNo">1373</span>   */<a name="line.1373"></a>
-<span class="sourceLineNo">1374</span>  public boolean preScannerClose(final InternalScanner s) throws IOException {<a name="line.1374"></a>
-<span class="sourceLineNo">1375</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1375"></a>
-<span class="sourceLineNo">1376</span>      @Override<a name="line.1376"></a>
-<span class="sourceLineNo">1377</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1377"></a>
-<span class="sourceLineNo">1378</span>          throws IOException {<a name="line.1378"></a>
-<span class="sourceLineNo">1379</span>        oserver.preScannerClose(ctx, s);<a name="line.1379"></a>
-<span class="sourceLineNo">1380</span>      }<a name="line.1380"></a>
-<span class="sourceLineNo">1381</span>    });<a name="line.1381"></a>
-<span class="sourceLineNo">1382</span>  }<a name="line.1382"></a>
-<span class="sourceLineNo">1383</span><a name="line.1383"></a>
-<span class="sourceLineNo">1384</span>  /**<a name="line.1384"></a>
-<span class="sourceLineNo">1385</span>   * @exception IOException Exception<a name="line.1385"></a>
-<span class="sourceLineNo">1386</span>   */<a name="line.1386"></a>
-<span class="sourceLineNo">1387</span>  public void postScannerClose(final InternalScanner s) throws IOException {<a name="line.1387"></a>
-<span class="sourceLineNo">1388</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1388"></a>
-<span class="sourceLineNo">1389</span>      @Override<a name="line.1389"></a>
-<span class="sourceLineNo">1390</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1390"></a>
-<span class="sourceLineNo">1391</span>          throws IOException {<a name="line.1391"></a>
-<span class="sourceLineNo">1392</span>        oserver.postScannerClose(ctx, s);<a name="line.1392"></a>
-<span class="sourceLineNo">1393</span>      }<a name="line.1393"></a>
-<span class="sourceLineNo">1394</span>    });<a name="line.1394"></a>
-<span class="sourceLineNo">1395</span>  }<a name="line.1395"></a>
-<span class="sourceLineNo">1396</span><a name="line.1396"></a>
-<span class="sourceLineNo">1397</span>  /**<a name="line.1397"></a>
-<span class="sourceLineNo">1398</span>   * @param info the RegionInfo for this region<a name="line.1398"></a>
-<span class="sourceLineNo">1399</span>   * @param edits the file of recovered edits<a name="line.1399"></a>
-<span class="sourceLineNo">1400</span>   * @throws IOException Exception<a name="line.1400"></a>
-<span class="sourceLineNo">1401</span>   */<a name="line.1401"></a>
-<span class="sourceLineNo">1402</span>  public void preReplayWALs(final HRegionInfo info, final Path edits) throws IOException {<a name="line.1402"></a>
-<span class="sourceLineNo">1403</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1403"></a>
-<span class="sourceLineNo">1404</span>      @Override<a name="line.1404"></a>
-<span class="sourceLineNo">1405</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1405"></a>
-<span class="sourceLineNo">1406</span>        throws IOException {<a name="line.1406"></a>
-<span class="sourceLineNo">1407</span>        oserver.preReplayWALs(ctx, info, edits);<a name="line.1407"></a>
-<span class="sourceLineNo">1408</span>      }<a name="line.1408"></a>
-<span class="sourceLineNo">1409</span>    });<a name="line.1409"></a>
-<span class="sourceLineNo">1410</span>  }<a name="line.1410"></a>
-<span class="sourceLineNo">1411</span><a name="line.1411"></a>
-<span class="sourceLineNo">1412</span>  /**<a name="line.1412"></a>
-<span class="sourceLineNo">1413</span>   * @param info the RegionInfo for this region<a name="line.1413"></a>
-<span class="sourceLineNo">1414</span>   * @param edits the file of recovered edits<a name="line.1414"></a>
-<span class="sourceLineNo">1415</span>   * @throws IOException Exception<a name="line.1415"></a>
-<span class="sourceLineNo">1416</span>   */<a name="line.1416"></a>
-<span class="sourceLineNo">1417</span>  public void postReplayWALs(final HRegionInfo info, final Path edits) throws IOException {<a name="line.1417"></a>
-<span class="sourceLineNo">1418</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1418"></a>
-<span class="sourceLineNo">1419</span>      @Override<a name="line.1419"></a>
-<span class="sourceLineNo">1420</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1420"></a>
-<span class="sourceLineNo">1421</span>        throws IOException {<a name="line.1421"></a>
-<span class="sourceLineNo">1422</span>        oserver.postReplayWALs(ctx, info, edits);<a name="line.1422"></a>
-<span class="sourceLineNo">1423</span>      }<a name="line.1423"></a>
-<span class="sourceLineNo">1424</span>    });<a name="line.1424"></a>
-<span class="sourceLineNo">1425</span>  }<a name="line.1425"></a>
-<span class="sourceLineNo">1426</span><a name="line.1426"></a>
-<span class="sourceLineNo">1427</span>  /**<a name="line.1427"></a>
-<span class="sourceLineNo">1428</span>   * @param info<a name="line.1428"></a>
-<span class="sourceLineNo">1429</span>   * @param logKey<a name="line.1429"></a>
-<span class="sourceLineNo">1430</span>   * @param logEdit<a name="line.1430"></a>
-<span class="sourceLineNo">1431</span>   * @return true if default behavior should be bypassed, false otherwise<a name="line.1431"></a>
-<span class="sourceLineNo">1432</span>   * @throws IOException<a name="line.1432"></a>
-<span class="sourceLineNo">1433</span>   */<a name="line.1433"></a>
-<span class="sourceLineNo">1434</span>  public boolean preWALRestore(final HRegionInfo info, final WALKey logKey,<a name="line.1434"></a>
-<span class="sourceLineNo">1435</span>      final WALEdit logEdit) throws IOException {<a name="line.1435"></a>
-<span class="sourceLineNo">1436</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1436"></a>
-<span class="sourceLineNo">1437</span>      @Override<a name="line.1437"></a>
-<span class="sourceLineNo">1438</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1438"></a>
-<span class="sourceLineNo">1439</span>          throws IOException {<a name="line.1439"></a>
-<span class="sourceLineNo">1440</span>        oserver.preWALRestore(ctx, info, logKey, logEdit);<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>  }<a name="line.1443"></a>
-<span class="sourceLineNo">1444</span><a name="line.1444"></a>
-<span class="sourceLineNo">1445</span>  /**<a name="line.1445"></a>
-<span class="sourceLineNo">1446</span>   * @param info<a name="line.1446"></a>
-<span class="sourceLineNo">1447</span>   * @param logKey<a name="line.1447"></a>
-<span class="sourceLineNo">1448</span>   * @param logEdit<a name="line.1448"></a>
-<span class="sourceLineNo">1449</span>   * @throws IOException<a name="line.1449"></a>
-<span class="sourceLineNo">1450</span>   */<a name="line.1450"></a>
-<span class="sourceLineNo">1451</span>  public void postWALRestore(final HRegionInfo info, final WALKey logKey, final WALEdit logEdit)<a name="line.1451"></a>
-<span class="sourceLineNo">1452</span>      throws IOException {<a name="line.1452"></a>
-<span class="sourceLineNo">1453</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1453"></a>
-<span class="sourceLineNo">1454</span>      @Override<a name="line.1454"></a>
-<span class="sourceLineNo">1455</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1455"></a>
-<span class="sourceLineNo">1456</span>          throws IOException {<a name="line.1456"></a>
-<span class="sourceLineNo">1457</span>        oserver.postWALRestore(ctx, info, logKey, logEdit);<a name="line.1457"></a>
-<span class="sourceLineNo">1458</span>      }<a name="line.1458"></a>
-<span class="sourceLineNo">1459</span>    });<a name="line.1459"></a>
-<span class="sourceLineNo">1460</span>  }<a name="line.1460"></a>
-<span class="sourceLineNo">1461</span><a name="line.1461"></a>
-<span class="sourceLineNo">1462</span>  /**<a name="line.1462"></a>
-<span class="sourceLineNo">1463</span>   * @param familyPaths pairs of { CF, file path } submitted for bulk load<a name="line.1463"></a>
-<span class="sourceLineNo">1464</span>   * @return true if the default operation should be bypassed<a name="line.1464"></a>
-<span class="sourceLineNo">1465</span>   * @throws IOException<a name="line.1465"></a>
-<span class="sourceLineNo">1466</span>   */<a name="line.1466"></a>
-<span class="sourceLineNo">1467</span>  public boolean preBulkLoadHFile(final List&lt;Pair&lt;byte[], String&gt;&gt; familyPaths) throws IOException {<a name="line.1467"></a>
-<span class="sourceLineNo">1468</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1468"></a>
-<span class="sourceLineNo">1469</span>      @Override<a name="line.1469"></a>
-<span class="sourceLineNo">1470</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1470"></a>
-<span class="sourceLineNo">1471</span>          throws IOException {<a name="line.1471"></a>
-<span class="sourceLineNo">1472</span>        oserver.preBulkLoadHFile(ctx, familyPaths);<a name="line.1472"></a>
-<span class="sourceLineNo">1473</span>      }<a name="line.1473"></a>
-<span class="sourceLineNo">1474</span>    });<a name="line.1474"></a>
-<span class="sourceLineNo">1475</span>  }<a name="line.1475"></a>
-<span class="sourceLineNo">1476</span><a name="line.1476"></a>
-<span class="sourceLineNo">1477</span>  public boolean preCommitStoreFile(final byte[] family, final List&lt;Pair&lt;Path, Path&gt;&gt; pairs)<a name="line.1477"></a>
-<span class="sourceLineNo">1478</span>      throws IOException {<a name="line.1478"></a>
-<span class="sourceLineNo">1479</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1479"></a>
-<span class="sourceLineNo">1480</span>      @Override<a name="line.1480"></a>
-<span class="sourceLineNo">1481</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1481"></a>
-<span class="sourceLineNo">1482</span>          throws IOException {<a name="line.1482"></a>
-<span class="sourceLineNo">1483</span>        oserver.preCommitStoreFile(ctx, family, pairs);<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>  public void postCommitStoreFile(final byte[] family, Path srcPath, Path dstPath) throws IOException {<a name="line.1487"></a>
-<span class="sourceLineNo">1488</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1488"></a>
-<span class="sourceLineNo">1489</span>      @Override<a name="line.1489"></a>
-<span class="sourceLineNo">1490</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1490"></a>
-<span class="sourceLineNo">1491</span>          throws IOException {<a name="line.1491"></a>
-<span class="sourceLineNo">1492</span>        oserver.postCommitStoreFile(ctx, family, srcPath, dstPath);<a name="line.1492"></a>
-<span class="sourceLineNo">1493</span>      }<a name="line.1493"></a>
-<span class="sourceLineNo">1494</span>    });<a name="line.1494"></a>
-<span class="sourceLineNo">1495</span>  }<a name="line.1495"></a>
-<span class="sourceLineNo">1496</span><a name="line.1496"></a>
-<span class="sourceLineNo">1497</span>  /**<a name="line.1497"></a>
-<span class="sourceLineNo">1498</span>   * @param familyPaths pairs of { CF, file path } submitted for bulk load<a name="line.1498"></a>
-<span class="sourceLineNo">1499</span>   * @param map Map of CF to List of file paths for the final loaded files<a name="line.1499"></a>
-<span class="sourceLineNo">1500</span>   * @param hasLoaded whether load was successful or not<a name="line.1500"></a>
-<span class="sourceLineNo">1501</span>   * @return the possibly modified value of hasLoaded<a name="line.1501"></a>
-<span class="sourceLineNo">1502</span>   * @throws IOException<a name="line.1502"></a>
-<span class="sourceLineNo">1503</span>   */<a name="line.1503"></a>
-<span class="sourceLineNo">1504</span>  public boolean postBulkLoadHFile(final List&lt;Pair&lt;byte[], String&gt;&gt; familyPaths,<a name="line.1504"></a>
-<span class="sourceLineNo">1505</span>      Map&lt;byte[], List&lt;Path&gt;&gt; map, boolean hasLoaded) throws IOException {<a name="line.1505"></a>
-<span class="sourceLineNo">1506</span>    return execOperationWithResult(hasLoaded,<a name="line.1506"></a>
-<span class="sourceLineNo">1507</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1507"></a>
-<span class="sourceLineNo">1508</span>      @Override<a name="line.1508"></a>
-<span class="sourceLineNo">1509</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1509"></a>
-<span class="sourceLineNo">1510</span>          throws IOException {<a name="line.1510"></a>
-<span class="sourceLineNo">1511</span>        setResult(oserver.postBulkLoadHFile(ctx, familyPaths, map, getResult()));<a name="line.1511"></a>
-<span class="sourceLineNo">1512</span>      }<a name="line.1512"></a>
-<span class="sourceLineNo">1513</span>    });<a name="line.1513"></a>
-<span class="sourceLineNo">1514</span>  }<a name="line.1514"></a>
-<span class="sourceLineNo">1515</span><a name="line.1515"></a>
-<span class="sourceLineNo">1516</span>  public void postStartRegionOperation(final Operation op) throws IOException {<a name="line.1516"></a>
-<span class="sourceLineNo">1517</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1517"></a>
-<span class="sourceLineNo">1518</span>      @Override<a name="line.1518"></a>
-<span class="sourceLineNo">1519</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1519"></a>
-<span class="sourceLineNo">1520</span>          throws IOException {<a name="line.1520"></a>
-<span class="sourceLineNo">1521</span>        oserver.postStartRegionOperation(ctx, op);<a name="line.1521"></a>
-<span class="sourceLineNo">1522</span>      }<a name="line.1522"></a>
-<span class="sourceLineNo">1523</span>    });<a name="line.1523"></a>
-<span class="sourceLineNo">1524</span>  }<a name="line.1524"></a>
-<span class="sourceLineNo">1525</span><a name="line.1525"></a>
-<span class="sourceLineNo">1526</span>  public void postCloseRegionOperation(final Operation op) throws IOException {<a name="line.1526"></a>
-<span class="sourceLineNo">1527</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1527"></a>
-<span class="sourceLineNo">1528</span>      @Override<a name="line.1528"></a>
-<span class="sourceLineNo">1529</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1529"></a>
-<span class="sourceLineNo">1530</span>          throws IOException {<a name="line.1530"></a>
-<span class="sourceLineNo">1531</span>        oserver.postCloseRegionOperation(ctx, op);<a name="line.1531"></a>
-<span class="sourceLineNo">1532</span>      }<a name="line.1532"></a>
-<span class="sourceLineNo">1533</span>    });<a name="line.1533"></a>
-<span class="sourceLineNo">1534</span>  }<a name="line.1534"></a>
-<span class="sourceLineNo">1535</span><a name="line.1535"></a>
-<span class="sourceLineNo">1536</span>  /**<a name="line.1536"></a>
-<span class="sourceLineNo">1537</span>   * @param fs fileystem to read from<a name="line.1537"></a>
-<span class="sourceLineNo">1538</span>   * @param p path to the file<a name="line.1538"></a>
-<span class="sourceLineNo">1539</span>   * @param in {@link FSDataInputStreamWrapper}<a name="line.1539"></a>
-<span class="sourceLineNo">1540</span>   * @param size Full size of the file<a name="line.1540"></a>
-<span class="sourceLineNo">1541</span>   * @param cacheConf<a name="line.1541"></a>
-<span class="sourceLineNo">1542</span>   * @param r original reference file. This will be not null only when reading a split file.<a name="line.1542"></a>
-<span class="sourceLineNo">1543</span>   * @return a Reader instance to use instead of the base reader if overriding<a name="line.1543"></a>
-<span class="sourceLineNo">1544</span>   * default behavior, null otherwise<a name="line.1544"></a>
-<span class="sourceLineNo">1545</span>   * @throws IOException<a name="line.1545"></a>
-<span class="sourceLineNo">1546</span>   */<a name="line.1546"></a>
-<span class="sourceLineNo">1547</span>  public StoreFileReader preStoreFileReaderOpen(final FileSystem fs, final Path p,<a name="line.1547"></a>
-<span class="sourceLineNo">1548</span>      final FSDataInputStreamWrapper in, final long size, final CacheConfig cacheConf,<a name="line.1548"></a>
-<span class="sourceLineNo">1549</span>      final Reference r) throws IOException {<a name="line.1549"></a>
-<span class="sourceLineNo">1550</span>    return execOperationWithResult(null,<a name="line.1550"></a>
-<span class="sourceLineNo">1551</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;StoreFileReader&gt;() {<a name="line.1551"></a>
-<span class="sourceLineNo">1552</span>      @Override<a name="line.1552"></a>
-<span class="sourceLineNo">1553</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1553"></a>
-<span class="sourceLineNo">1554</span>          throws IOException {<a name="line.1554"></a>
-<span class="sourceLineNo">1555</span>        setResult(oserver.preStoreFileReaderOpen(ctx, fs, p, in, size, cacheConf, r, getResult()));<a name="line.1555"></a>
-<span class="sourceLineNo">1556</span>      }<a name="line.1556"></a>
-<span class="sourceLineNo">1557</span>    });<a name="line.1557"></a>
-<span class="sourceLineNo">1558</span>  }<a name="line.1558"></a>
-<span class="sourceLineNo">1559</span><a name="line.1559"></a>
-<span class="sourceLineNo">1560</span>  /**<a name="line.1560"></a>
-<span class="sourceLineNo">1561</span>   * @param fs fileystem to read from<a name="line.1561"></a>
-<span class="sourceLineNo">1562</span>   * @param p path to the file<a name="line.1562"></a>
-<span class="sourceLineNo">1563</span>   * @param in {@link FSDataInputStreamWrapper}<a name="line.1563"></a>
-<span class="sourceLineNo">1564</span>   * @param size Full size of the file<a name="line.1564"></a>
-<span class="sourceLineNo">1565</span>   * @param cacheConf<a name="line.1565"></a>
-<span class="sourceLineNo">1566</span>   * @param r original reference file. This will be not null only when reading a split file.<a name="line.1566"></a>
-<span class="sourceLineNo">1567</span>   * @param reader the base reader instance<a name="line.1567"></a>
-<span class="sourceLineNo">1568</span>   * @return The reader to use<a name="line.1568"></a>
-<span class="sourceLineNo">1569</span>   * @throws IOException<a name="line.1569"></a>
-<span class="sourceLineNo">1570</span>   */<a name="line.1570"></a>
-<span class="sourceLineNo">1571</span>  public StoreFileReader postStoreFileReaderOpen(final FileSystem fs, final Path p,<a name="line.1571"></a>
-<span class="sourceLineNo">1572</span>      final FSDataInputStreamWrapper in, final long size, final CacheConfig cacheConf,<a name="line.1572"></a>
-<span class="sourceLineNo">1573</span>      final Reference r, final StoreFileReader reader) throws IOException {<a name="line.1573"></a>
-<span class="sourceLineNo">1574</span>    return execOperationWithResult(reader,<a name="line.1574"></a>
-<span class="sourceLineNo">1575</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;StoreFileReader&gt;() {<a name="line.1575"></a>
-<span class="sourceLineNo">1576</span>      @Override<a name="line.1576"></a>
-<span class="sourceLineNo">1577</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1577"></a>
-<span class="sourceLineNo">1578</span>          throws IOException {<a name="line.1578"></a>
-<span class="sourceLineNo">1579</span>        setResult(oserver.postStoreFileReaderOpen(ctx, fs, p, in, size, cacheConf, r, getResult()));<a name="line.1579"></a>
-<span class="sourceLineNo">1580</span>      }<a name="line.1580"></a>
-<span class="sourceLineNo">1581</span>    });<a name="line.1581"></a>
-<span class="sourceLineNo">1582</span>  }<a name="line.1582"></a>
-<span class="sourceLineNo">1583</span><a name="line.1583"></a>
-<span class="sourceLineNo">1584</span>  public Cell postMutationBeforeWAL(final MutationType opType, final Mutation mutation,<a name="line.1584"></a>
-<span class="sourceLineNo">1585</span>      final Cell oldCell, Cell newCell) throws IOException {<a name="line.1585"></a>
-<span class="sourceLineNo">1586</span>    return execOperationWithResult(newCell,<a name="line.1586"></a>
-<span class="sourceLineNo">1587</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Cell&gt;() {<a name="line.1587"></a>
-<span class="sourceLineNo">1588</span>      @Override<a name="line.1588"></a>
-<span class="sourceLineNo">1589</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1589"></a>
-<span class="sourceLineNo">1590</span>          throws IOException {<a name="line.1590"></a>
-<span class="sourceLineNo">1591</span>        setResult(oserver.postMutationBeforeWAL(ctx, opType, mutation, oldCell, getResult()));<a name="line.1591"></a>
-<span class="sourceLineNo">1592</span>      }<a name="line.1592"></a>
-<span class="sourceLineNo">1593</span>    });<a name="line.1593"></a>
-<span class="sourceLineNo">1594</span>  }<a name="line.1594"></a>
-<span class="sourceLineNo">1595</span><a name="line.1595"></a>
-<span class="sourceLineNo">1596</span>  public Message preEndpointInvocation(final Service service, final String methodName,<a name="line.1596"></a>
-<span class="sourceLineNo">1597</span>      Message request) throws IOException {<a name="line.1597"></a>
-<span class="sourceLineNo">1598</span>    return execOperationWithResult(request,<a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>        coprocessors.isEmpty() ? null : new EndpointOperationWithResult&lt;Message&gt;() {<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span>      @Override<a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>      public void call(EndpointObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>          throws IOException {<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>        setResult(oserver.preEndpointInvocation(ctx, service, methodName, getResult()));<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>      }<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>    });<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>  }<a name="line.1606"></a>
-<span class="sourceLineNo">1607</span><a name="line.1607"></a>
-<span class="sourceLineNo">1608</span>  public void postEndpointInvocation(final Service service, final String methodName,<a name="line.1608"></a>
-<span class="sourceLineNo">1609</span>      final Message request, final Message.Builder responseBuilder) throws IOException {<a name="line.1609"></a>
-<span class="sourceLineNo">1610</span>    execOperation(coprocessors.isEmpty() ? null : new EndpointOperation() {<a name="line.1610"></a>
-<span class="sourceLineNo">1611</span>      @Override<a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>      public void call(EndpointObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>          throws IOException {<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>        oserver.postEndpointInvocation(ctx, service, methodName, request, responseBuilder);<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>      }<a name="line.1615"></a>
-<span class="sourceLineNo">1616</span>    });<a name="line.1616"></a>
-<span class="sourceLineNo">1617</span>  }<a name="line.1617"></a>
-<span class="sourceLineNo">1618</span><a name="line.1618"></a>
-<span class="sourceLineNo">1619</span>  public DeleteTracker postInstantiateDeleteTracker(DeleteTracker tracker) throws IOException {<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>    return execOperationWithResult(tracker,<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;DeleteTracker&gt;() {<a name="line.1621"></a>
-<span class="sourceLineNo">1622</span>      @Override<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>          throws IOException {<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span>        setResult(oserver.postInstantiateDeleteTracker(ctx, getResult()));<a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>      }<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span>    });<a name="line.1627"></a>
-<span class="sourceLineNo">1628</span>  }<a name="line.1628"></a>
-<span class="sourceLineNo">1629</span><a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>  private static abstract class CoprocessorOperation<a name="line.1630"></a>
-<span class="sourceLineNo">1631</span>      extends ObserverContext&lt;RegionCoprocessorEnvironment&gt; {<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>    public CoprocessorOperation() {<a name="line.1632"></a>
-<span class="sourceLineNo">1633</span>      this(RpcServer.getRequestUser());<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span>    }<a name="line.1634"></a>
-<span class="sourceLineNo">1635</span><a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>    public CoprocessorOperation(User user) {<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>      super(user);<a name="line.1637"></a>
-<span class="sourceLineNo">1638</span>    }<a name="line.1638"></a>
-<span class="sourceLineNo">1639</span><a name="line.1639"></a>
-<span class="sourceLineNo">1640</span>    public abstract void call(Coprocessor observer,<a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>        ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx) throws IOException;<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span>    public abstract boolean hasCall(Coprocessor observer);<a name="line.1642"></a>
-<span class="sourceLineNo">1643</span>    public void postEnvCall(RegionEnvironment env) { }<a name="line.1643"></a>
-<span class="sourceLineNo">1644</span>  }<a name="line.1644"></a>
-<span class="sourceLineNo">1645</span><a name="line.1645"></a>
-<span class="sourceLineNo">1646</span>  private static abstract class RegionOperation extends CoprocessorOperation {<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>    public RegionOperation() {<a name="line.1647"></a>
-<span class="sourceLineNo">1648</span>    }<a name="line.1648"></a>
-<span class="sourceLineNo">1649</span><a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>    public RegionOperation(User user) {<a name="line.1650"></a>
-<span class="sourceLineNo">1651</span>      super(user);<a name="line.1651"></a>
-<span class="sourceLineNo">1652</span>    }<a name="line.1652"></a>
-<span class="sourceLineNo">1653</span><a name="line.1653"></a>
-<span class="sourceLineNo">1654</span>    public abstract void call(RegionObserver observer,<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>        ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx) throws IOException;<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span><a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>    public boolean hasCall(Coprocessor observer) {<a name="line.1657"></a>
-<span class="sourceLineNo">1658</span>      return observer instanceof RegionObserver;<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span>    }<a name="line.1659"></a>
-<span class="sourceLineNo">1660</span><a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>    public void call(Coprocessor observer, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1661"></a>
-<span class="sourceLineNo">1662</span>        throws IOException {<a name="line.1662"></a>
-<span class="sourceLineNo">1663</span>      call((RegionObserver)observer, ctx);<a name="line.1663"></a>
-<span class="sourceLineNo">1664</span>    }<a name="line.1664"></a>
-<span class="sourceLineNo">1665</span>  }<a name="line.1665"></a>
-<span class="sourceLineNo">1666</span><a name="line.1666"></a>
-<span class="sourceLineNo">1667</span>  private static abstract class RegionOperationWithResult&lt;T&gt; extends RegionOperation {<a name="line.1667"></a>
-<span class="sourceLineNo">1668</span>    public RegionOperationWithResult() {<a name="line.1668"></a>
-<span class="sourceLineNo">1669</span>    }<a name="line.1669"></a>
-<span class="sourceLineNo">1670</span><a name="line.1670"></a>
-<span class="sourceLineNo">1671</span>    public RegionOperationWithResult(User user) {<a name="line.1671"></a>
-<span class="sourceLineNo">1672</span>      super (user);<a name="line.1672"></a>
-<span class="sourceLineNo">1673</span>    }<a name="line.1673"></a>
-<span class="sourceLineNo">1674</span><a name="line.1674"></a>
-<span class="sourceLineNo">1675</span>    private T result = null;<a name="line.1675"></a>
-<span class="sourceLineNo">1676</span>    public void setResult(final T result) { this.result = result; }<a name="line.1676"></a>
-<span class="sourceLineNo">1677</span>    public T getResult() { return this.result; }<a name="line.1677"></a>
-<span class="sourceLineNo">1678</span>  }<a name="line.1678"></a>
-<span class="sourceLineNo">1679</span><a name="line.1679"></a>
-<span class="sourceLineNo">1680</span>  private static abstract class EndpointOperation extends CoprocessorOperation {<a name="line.1680"></a>
-<span class="sourceLineNo">1681</span>    public abstract void call(EndpointObserver observer,<a name="line.1681"></a>
-<span class="sourceLineNo">1682</span>        ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx) throws IOException;<a name="line.1682"></a>
-<span class="sourceLineNo">1683</span><a name="line.1683"></a>
-<span class="sourceLineNo">1684</span>    public boolean hasCall(Coprocessor observer) {<a name="line.1684"></a>
-<span class="sourceLineNo">1685</span>      return observer instanceof EndpointObserver;<a name="line.1685"></a>
-<span class="sourceLineNo">1686</span>    }<a name="line.1686"></a>
-<span class="sourceLineNo">1687</span><a name="line.1687"></a>
-<span class="sourceLineNo">1688</span>    public void call(Coprocessor observer, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1688"></a>
-<span class="sourceLineNo">1689</span>        throws IOException {<a name="line.1689"></a>
-<span class="sourceLineNo">1690</span>      call((EndpointObserver)observer, ctx);<a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>    }<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span>  }<a name="line.1692"></a>
-<span class="sourceLineNo">1693</span><a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>  private static abstract class EndpointOperationWithResult&lt;T&gt; extends EndpointOperation {<a name="line.1694"></a>
-<span class="sourceLineNo">1695</span>    private T result = null;<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>    public void setResult(final T result) { this.result = result; }<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>    public T getResult() { return this.result; }<a name="line.1697"></a>
-<span class="sourceLineNo">1698</span>  }<a name="line.1698"></a>
-<span class="sourceLineNo">1699</span><a name="line.1699"></a>
-<span class="sourceLineNo">1700</span>  private boolean execOperation(final CoprocessorOperation ctx)<a name="line.1700"></a>
-<span class="sourceLineNo">1701</span>      throws IOException {<a name="line.1701"></a>
-<span class="sourceLineNo">1702</span>    return execOperation(true, ctx);<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>  private &lt;T&gt; T execOperationWithResult(final T defaultValue,<a name="line.1705"></a>
-<span class="sourceLineNo">1706</span>      final RegionOperationWithResult&lt;T&gt; ctx) throws IOException {<a name="line.1706"></a>
-<span class="sourceLineNo">1707</span>    if (ctx == null) return defaultValue;<a name="line.1707"></a>
-<span class="sourceLineNo">1708</span>    ctx.setResult(defaultValue);<a name="line.1708"></a>
-<span class="sourceLineNo">1709</span>    execOperation(true, ctx);<a name="line.1709"></a>
-<span class="sourceLineNo">1710</span>    return ctx.getResult();<a name="line.1710"></a>
-<span class="sourceLineNo">1711</span>  }<a name="line.1711"></a>
-<span class="sourceLineNo">1712</span><a name="line.1712"></a>
-<span class="sourceLineNo">1713</span>  private &lt;T&gt; T execOperationWithResult(final boolean ifBypass, final T defaultValue,<a name="line.1713"></a>
-<span class="sourceLineNo">1714</span>      final RegionOperationWithResult&lt;T&gt; ctx) throws IOException {<a name="line.1714"></a>
-<span class="sourceLineNo">1715</span>    boolean bypass = false;<a name="line.1715"></a>
-<span class="sourceLineNo">1716</span>    T result = defaultValue;<a name="line.1716"></a>
-<span class="sourceLineNo">1717</span>    if (ctx != null) {<a name="line.1717"></a>
-<span class="sourceLineNo">1718</span>      ctx.setResult(defaultValue);<a name="line.1718"></a>
-<span class="sourceLineNo">1719</span>      bypass = execOperation(true, ctx);<a name="line.1719"></a>
-<span class="sourceLineNo">1720</span>      result = ctx.getResult();<a name="line.1720"></a>
-<span class="sourceLineNo">1721</span>    }<a name="line.1721"></a>
-<span class="sourceLineNo">1722</span>    return bypass == ifBypass ? result : null;<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>  private &lt;T&gt; T execOperationWithResult(final T defaultValue,<a name="line.1725"></a>
-<span class="sourceLineNo">1726</span>      final EndpointOperationWithResult&lt;T&gt; ctx) throws IOException {<a name="line.1726"></a>
-<span class="sourceLineNo">1727</span>    if (ctx == null) return defaultValue;<a name="line.1727"></a>
-<span class="sourceLineNo">1728</span>    ctx.setResult(defaultValue);<a name="line.1728"></a>
-<span class="sourceLineNo">1729</span>    execOperation(true, ctx);<a name="line.1729"></a>
-<span class="sourceLineNo">1730</span>    return ctx.getResult();<a name="line.1730"></a>
-<span class="sourceLineNo">1731</span>  }<a name="line.1731"></a>
-<span class="sourceLineNo">1732</span><a name="line.1732"></a>
-<span class="sourceLineNo">1733</span>  private boolean execOperation(final boolean earlyExit, final CoprocessorOperation ctx)<a name="line.1733"></a>
-<span class="sourceLineNo">1734</span>      throws IOException {<a name="line.1734"></a>
-<span class="sourceLineNo">1735</span>    boolean bypass = false;<a name="line.1735"></a>
-<span class="sourceLineNo">1736</span>    List&lt;RegionEnvironment&gt; envs = coprocessors.get();<a name="line.1736"></a>
-<span class="sourceLineNo">1737</span>    for (int i = 0; i &lt; envs.size(); i++) {<a name="line.1737"></a>
-<span class="sourceLineNo">1738</span>      RegionEnvironment env = envs.get(i);<a name="line.1738"></a>
-<span class="sourceLineNo">1739</span>      Coprocessor observer = env.getInstance();<a name="line.1739"></a>
-<span class="sourceLineNo">1740</span>      if (ctx.hasCall(observer)) {<a name="line.1740"></a>
-<span class="sourceLineNo">1741</span>        ctx.prepare(env);<a name="line.1741"></a>
-<span class="sourceLineNo">1742</span>        Thread currentThread = Thread.currentThread();<a name="line.1742"></a>
-<span class="sourceLineNo">1743</span>        ClassLoader cl = currentThread.getContextClassLoader();<a name="line.1743"></a>
-<span class="sourceLineNo">1744</span>        try {<a name="line.1744"></a>
-<span class="sourceLineNo">1745</span>          currentThread.setContextClassLoader(env.getClassLoader());<a name="line.1745"></a>
-<span class="sourceLineNo">1746</span>          ctx.call(observer, ctx);<a name="line.1746"></a>
-<span class="sourceLineNo">1747</span>        } catch (Throwable e) {<a name="line.1747"></a>
-<span class="sourceLineNo">1748</span>          handleCoprocessorThrowable(env, e);<a name="line.1748"></a>
-<span class="sourceLineNo">1749</span>        } finally {<a name="line.1749"></a>
-<span class="sourceLineNo">1750</span>          currentThread.setContextClassLoader(cl);<a name="line.1750"></a>
-<span class="sourceLineNo">1751</span>        }<a name="line.1751"></a>
-<span class="sourceLineNo">1752</span>        bypass |= ctx.shouldBypass();<a name="line.1752"></a>
-<span class="sourceLineNo">1753</span>        if (earlyExit &amp;&amp; ctx.shouldComplete()) {<a name="line.1753"></a>
-<span class="sourceLineNo">1754</span>          break;<a name="line.1754"></a>
-<span class="sourceLineNo">1755</span>        }<a name="line.1755"></a>
-<span class="sourceLineNo">1756</span>      }<a name="line.1756"></a>
-<span class="sourceLineNo">1757</span><a name="line.1757"></a>
-<span class="sourceLineNo">1758</span>      ctx.postEnvCall(env);<a name="line.1758"></a>
-<span class="sourceLineNo">1759</span>    }<a name="line.1759"></a>
-<span class="sourceLineNo">1760</span>    return bypass;<a name="line.1760"></a>
-<span class="sourceLineNo">1761</span>  }<a name="line.1761"></a>
-<span class="sourceLineNo">1762</span>}<a name="line.1762"></a>
+<span class="sourceLineNo">1229</span>  public Result postAppend(final Append append, final Result result) throws IOException {<a name="line.1229"></a>
+<span class="sourceLineNo">1230</span>    return execOperationWithResult(result,<a name="line.1230"></a>
+<span class="sourceLineNo">1231</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Result&gt;() {<a name="line.1231"></a>
+<span class="sourceLineNo">1232</span>      @Override<a name="line.1232"></a>
+<span class="sourceLineNo">1233</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1233"></a>
+<span class="sourceLineNo">1234</span>          throws IOException {<a name="line.1234"></a>
+<span class="sourceLineNo">1235</span>        setResult(oserver.postAppend(ctx, append, result));<a name="line.1235"></a>
+<span class="sourceLineNo">1236</span>      }<a name="line.1236"></a>
+<span class="sourceLineNo">1237</span>    });<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>  /**<a name="line.1240"></a>
+<span class="sourceLineNo">1241</span>   * @param increment increment object<a name="line.1241"></a>
+<span class="sourceLineNo">1242</span>   * @param result the result returned by postIncrement<a name="line.1242"></a>
+<span class="sourceLineNo">1243</span>   * @throws IOException if an error occurred on the coprocessor<a name="line.1243"></a>
+<span class="sourceLineNo">1244</span>   */<a name="line.1244"></a>
+<span class="sourceLineNo">1245</span>  public Result postIncrement(final Increment increment, Result result) throws IOException {<a name="line.1245"></a>
+<span class="sourceLineNo">1246</span>    return execOperationWithResult(result,<a name="line.1246"></a>
+<span class="sourceLineNo">1247</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Result&gt;() {<a name="line.1247"></a>
+<span class="sourceLineNo">1248</span>      @Override<a name="line.1248"></a>
+<span class="sourceLineNo">1249</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1249"></a>
+<span class="sourceLineNo">1250</span>          throws IOException {<a name="line.1250"></a>
+<span class="sourceLineNo">1251</span>        setResult(oserver.postIncrement(ctx, increment, getResult()));<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 name="line.1255"></a>
+<span class="sourceLineNo">1256</span>  /**<a name="line.1256"></a>
+<span class="sourceLineNo">1257</span>   * @param scan the Scan specification<a name="line.1257"></a>
+<span class="sourceLineNo">1258</span>   * @return scanner id to return to client if default operation should be<a name="line.1258"></a>
+<span class="sourceLineNo">1259</span>   * bypassed, null otherwise<a name="line.1259"></a>
+<span class="sourceLineNo">1260</span>   * @exception IOException Exception<a name="line.1260"></a>
+<span class="sourceLineNo">1261</span>   */<a name="line.1261"></a>
+<span class="sourceLineNo">1262</span>  public RegionScanner preScannerOpen(final Scan scan) throws IOException {<a name="line.1262"></a>
+<span class="sourceLineNo">1263</span>    return execOperationWithResult(true, null,<a name="line.1263"></a>
+<span class="sourceLineNo">1264</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;RegionScanner&gt;() {<a name="line.1264"></a>
+<span class="sourceLineNo">1265</span>      @Override<a name="line.1265"></a>
+<span class="sourceLineNo">1266</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1266"></a>
+<span class="sourceLineNo">1267</span>          throws IOException {<a name="line.1267"></a>
+<span class="sourceLineNo">1268</span>        setResult(oserver.preScannerOpen(ctx, scan, getResult()));<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>  }<a name="line.1271"></a>
+<span class="sourceLineNo">1272</span><a name="line.1272"></a>
+<span class="sourceLineNo">1273</span>  /**<a name="line.1273"></a>
+<span class="sourceLineNo">1274</span>   * See<a name="line.1274"></a>
+<span class="sourceLineNo">1275</span>   * {@link RegionObserver#preStoreScannerOpen(ObserverContext,<a name="line.1275"></a>
+<span class="sourceLineNo">1276</span>   *    Store, Scan, NavigableSet, KeyValueScanner)}<a name="line.1276"></a>
+<span class="sourceLineNo">1277</span>   */<a name="line.1277"></a>
+<span class="sourceLineNo">1278</span>  public KeyValueScanner preStoreScannerOpen(final Store store, final Scan scan,<a name="line.1278"></a>
+<span class="sourceLineNo">1279</span>      final NavigableSet&lt;byte[]&gt; targetCols, final long readPt) throws IOException {<a name="line.1279"></a>
+<span class="sourceLineNo">1280</span>    return execOperationWithResult(null,<a name="line.1280"></a>
+<span class="sourceLineNo">1281</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;KeyValueScanner&gt;() {<a name="line.1281"></a>
+<span class="sourceLineNo">1282</span>      @Override<a name="line.1282"></a>
+<span class="sourceLineNo">1283</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1283"></a>
+<span class="sourceLineNo">1284</span>          throws IOException {<a name="line.1284"></a>
+<span class="sourceLineNo">1285</span>        setResult(oserver.preStoreScannerOpen(ctx, store, scan, targetCols, getResult(), readPt));<a name="line.1285"></a>
+<span class="sourceLineNo">1286</span>      }<a name="line.1286"></a>
+<span class="sourceLineNo">1287</span>    });<a name="line.1287"></a>
+<span class="sourceLineNo">1288</span>  }<a name="line.1288"></a>
+<span class="sourceLineNo">1289</span><a name="line.1289"></a>
+<span class="sourceLineNo">1290</span>  /**<a name="line.1290"></a>
+<span class="sourceLineNo">1291</span>   * @param scan the Scan specification<a name="line.1291"></a>
+<span class="sourceLineNo">1292</span>   * @param s the scanner<a name="line.1292"></a>
+<span class="sourceLineNo">1293</span>   * @return the scanner instance to use<a name="line.1293"></a>
+<span class="sourceLineNo">1294</span>   * @exception IOException Exception<a name="line.1294"></a>
+<span class="sourceLineNo">1295</span>   */<a name="line.1295"></a>
+<span class="sourceLineNo">1296</span>  public RegionScanner postScannerOpen(final Scan scan, RegionScanner s) throws IOException {<a name="line.1296"></a>
+<span class="sourceLineNo">1297</span>    return execOperationWithResult(s,<a name="line.1297"></a>
+<span class="sourceLineNo">1298</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;RegionScanner&gt;() {<a name="line.1298"></a>
+<span class="sourceLineNo">1299</span>      @Override<a name="line.1299"></a>
+<span class="sourceLineNo">1300</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1300"></a>
+<span class="sourceLineNo">1301</span>          throws IOException {<a name="line.1301"></a>
+<span class="sourceLineNo">1302</span>        setResult(oserver.postScannerOpen(ctx, scan, getResult()));<a name="line.1302"></a>
+<span class="sourceLineNo">1303</span>      }<a name="line.1303"></a>
+<span class="sourceLineNo">1304</span>    });<a name="line.1304"></a>
+<span class="sourceLineNo">1305</span>  }<a name="line.1305"></a>
+<span class="sourceLineNo">1306</span><a name="line.1306"></a>
+<span class="sourceLineNo">1307</span>  /**<a name="line.1307"></a>
+<span class="sourceLineNo">1308</span>   * @param s the scanner<a name="line.1308"></a>
+<span class="sourceLineNo">1309</span>   * @param results the result set returned by the region server<a name="line.1309"></a>
+<span class="sourceLineNo">1310</span>   * @param limit the maximum number of results to return<a name="line.1310"></a>
+<span class="sourceLineNo">1311</span>   * @return 'has next' indication to client if bypassing default behavior, or<a name="line.1311"></a>
+<span class="sourceLineNo">1312</span>   * null otherwise<a name="line.1312"></a>
+<span class="sourceLineNo">1313</span>   * @exception IOException Exception<a name="line.1313"></a>
+<span class="sourceLineNo">1314</span>   */<a name="line.1314"></a>
+<span class="sourceLineNo">1315</span>  public Boolean preScannerNext(final InternalScanner s,<a name="line.1315"></a>
+<span class="sourceLineNo">1316</span>      final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.1316"></a>
+<span class="sourceLineNo">1317</span>    return execOperationWithResult(true, false,<a name="line.1317"></a>
+<span class="sourceLineNo">1318</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1318"></a>
+<span class="sourceLineNo">1319</span>      @Override<a name="line.1319"></a>
+<span class="sourceLineNo">1320</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1320"></a>
+<span class="sourceLineNo">1321</span>          throws IOException {<a name="line.1321"></a>
+<span class="sourceLineNo">1322</span>        setResult(oserver.preScannerNext(ctx, s, results, limit, getResult()));<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>  }<a name="line.1325"></a>
+<span class="sourceLineNo">1326</span><a name="line.1326"></a>
+<span class="sourceLineNo">1327</span>  /**<a name="line.1327"></a>
+<span class="sourceLineNo">1328</span>   * @param s the scanner<a name="line.1328"></a>
+<span class="sourceLineNo">1329</span>   * @param results the result set returned by the region server<a name="line.1329"></a>
+<span class="sourceLineNo">1330</span>   * @param limit the maximum number of results to return<a name="line.1330"></a>
+<span class="sourceLineNo">1331</span>   * @param hasMore<a name="line.1331"></a>
+<span class="sourceLineNo">1332</span>   * @return 'has more' indication to give to client<a name="line.1332"></a>
+<span class="sourceLineNo">1333</span>   * @exception IOException Exception<a name="line.1333"></a>
+<span class="sourceLineNo">1334</span>   */<a name="line.1334"></a>
+<span class="sourceLineNo">1335</span>  public boolean postScannerNext(final InternalScanner s,<a name="line.1335"></a>
+<span class="sourceLineNo">1336</span>      final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.1336"></a>
+<span class="sourceLineNo">1337</span>      throws IOException {<a name="line.1337"></a>
+<span class="sourceLineNo">1338</span>    return execOperationWithResult(hasMore,<a name="line.1338"></a>
+<span class="sourceLineNo">1339</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1339"></a>
+<span class="sourceLineNo">1340</span>      @Override<a name="line.1340"></a>
+<span class="sourceLineNo">1341</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1341"></a>
+<span class="sourceLineNo">1342</span>          throws IOException {<a name="line.1342"></a>
+<span class="sourceLineNo">1343</span>        setResult(oserver.postScannerNext(ctx, s, results, limit, getResult()));<a name="line.1343"></a>
+<span class="sourceLineNo">1344</span>      }<a name="line.1344"></a>
+<span class="sourceLineNo">1345</span>    });<a name="line.1345"></a>
+<span class="sourceLineNo">1346</span>  }<a name="line.1346"></a>
+<span class="sourceLineNo">1347</span><a name="line.1347"></a>
+<span class="sourceLineNo">1348</span>  /**<a name="line.1348"></a>
+<span class="sourceLineNo">1349</span>   * This will be called by the scan flow when the current scanned row is being filtered out by the<a name="line.1349"></a>
+<span class="sourceLineNo">1350</span>   * filter.<a name="line.1350"></a>
+<span class="sourceLineNo">1351</span>   * @param s the scanner<a name="line.1351"></a>
+<span class="sourceLineNo">1352</span>   * @param curRowCell The cell in the current row which got filtered out<a name="line.1352"></a>
+<span class="sourceLineNo">1353</span>   * @return whether more rows are available for the scanner or not<a name="line.1353"></a>
+<span class="sourceLineNo">1354</span>   * @throws IOException<a name="line.1354"></a>
+<span class="sourceLineNo">1355</span>   */<a name="line.1355"></a>
+<span class="sourceLineNo">1356</span>  public boolean postScannerFilterRow(final InternalScanner s, final Cell curRowCell)<a name="line.1356"></a>
+<span class="sourceLineNo">1357</span>      throws IOException {<a name="line.1357"></a>
+<span class="sourceLineNo">1358</span>    // short circuit for performance<a name="line.1358"></a>
+<span class="sourceLineNo">1359</span>    if (!hasCustomPostScannerFilterRow) return true;<a name="line.1359"></a>
+<span class="sourceLineNo">1360</span>    return execOperationWithResult(true,<a name="line.1360"></a>
+<span class="sourceLineNo">1361</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1361"></a>
+<span class="sourceLineNo">1362</span>      @Override<a name="line.1362"></a>
+<span class="sourceLineNo">1363</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1363"></a>
+<span class="sourceLineNo">1364</span>          throws IOException {<a name="line.1364"></a>
+<span class="sourceLineNo">1365</span>        setResult(oserver.postScannerFilterRow(ctx, s, curRowCell, getResult()));<a name="line.1365"></a>
+<span class="sourceLineNo">1366</span>      }<a name="line.1366"></a>
+<span class="sourceLineNo">1367</span>    });<a name="line.1367"></a>
+<span class="sourceLineNo">1368</span>  }<a name="line.1368"></a>
+<span class="sourceLineNo">1369</span><a name="line.1369"></a>
+<span class="sourceLineNo">1370</span>  /**<a name="line.1370"></a>
+<span class="sourceLineNo">1371</span>   * @param s the scanner<a name="line.1371"></a>
+<span class="sourceLineNo">1372</span>   * @return true if default behavior should be bypassed, false otherwise<a name="line.1372"></a>
+<span class="sourceLineNo">1373</span>   * @exception IOException Exception<a name="line.1373"></a>
+<span class="sourceLineNo">1374</span>   */<a name="line.1374"></a>
+<span class="sourceLineNo">1375</span>  public boolean preScannerClose(final InternalScanner s) throws IOException {<a name="line.1375"></a>
+<span class="sourceLineNo">1376</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1376"></a>
+<span class="sourceLineNo">1377</span>      @Override<a name="line.1377"></a>
+<span class="sourceLineNo">1378</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1378"></a>
+<span class="sourceLineNo">1379</span>          throws IOException {<a name="line.1379"></a>
+<span class="sourceLineNo">1380</span>        oserver.preScannerClose(ctx, s);<a name="line.1380"></a>
+<span class="sourceLineNo">1381</span>      }<a name="line.1381"></a>
+<span class="sourceLineNo">1382</span>    });<a name="line.1382"></a>
+<span class="sourceLineNo">1383</span>  }<a name="line.1383"></a>
+<span class="sourceLineNo">1384</span><a name="line.1384"></a>
+<span class="sourceLineNo">1385</span>  /**<a name="line.1385"></a>
+<span class="sourceLineNo">1386</span>   * @exception IOException Exception<a name="line.1386"></a>
+<span class="sourceLineNo">1387</span>   */<a name="line.1387"></a>
+<span class="sourceLineNo">1388</span>  public void postScannerClose(final InternalScanner s) throws IOException {<a name="line.1388"></a>
+<span class="sourceLineNo">1389</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1389"></a>
+<span class="sourceLineNo">1390</span>      @Override<a name="line.1390"></a>
+<span class="sourceLineNo">1391</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1391"></a>
+<span class="sourceLineNo">1392</span>          throws IOException {<a name="line.1392"></a>
+<span class="sourceLineNo">1393</span>        oserver.postScannerClose(ctx, s);<a name="line.1393"></a>
+<span class="sourceLineNo">1394</span>      }<a name="line.1394"></a>
+<span class="sourceLineNo">1395</span>    });<a name="line.1395"></a>
+<span class="sourceLineNo">1396</span>  }<a name="line.1396"></a>
+<span class="sourceLineNo">1397</span><a name="line.1397"></a>
+<span class="sourceLineNo">1398</span>  /**<a name="line.1398"></a>
+<span class="sourceLineNo">1399</span>   * @param info the RegionInfo for this region<a name="line.1399"></a>
+<span class="sourceLineNo">1400</span>   * @param edits the file of recovered edits<a name="line.1400"></a>
+<span class="sourceLineNo">1401</span>   * @throws IOException Exception<a name="line.1401"></a>
+<span class="sourceLineNo">1402</span>   */<a name="line.1402"></a>
+<span class="sourceLineNo">1403</span>  public void preReplayWALs(final HRegionInfo info, final Path edits) throws IOException {<a name="line.1403"></a>
+<span class="sourceLineNo">1404</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1404"></a>
+<span class="sourceLineNo">1405</span>      @Override<a name="line.1405"></a>
+<span class="sourceLineNo">1406</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1406"></a>
+<span class="sourceLineNo">1407</span>        throws IOException {<a name="line.1407"></a>
+<span class="sourceLineNo">1408</span>        oserver.preReplayWALs(ctx, info, edits);<a name="line.1408"></a>
+<span class="sourceLineNo">1409</span>      }<a name="line.1409"></a>
+<span class="sourceLineNo">1410</span>    });<a name="line.1410"></a>
+<span class="sourceLineNo">1411</span>  }<a name="line.1411"></a>
+<span class="sourceLineNo">1412</span><a name="line.1412"></a>
+<span class="sourceLineNo">1413</span>  /**<a name="line.1413"></a>
+<span class="sourceLineNo">1414</span>   * @param info the RegionInfo for this region<a name="line.1414"></a>
+<span class="sourceLineNo">1415</span>   * @param edits the file of recovered edits<a name="line.1415"></a>
+<span class="sourceLineNo">1416</span>   * @throws IOException Exception<a name="line.1416"></a>
+<span class="sourceLineNo">1417</span>   */<a name="line.1417"></a>
+<span class="sourceLineNo">1418</span>  public void postReplayWALs(final HRegionInfo info, final Path edits) throws IOException {<a name="line.1418"></a>
+<span class="sourceLineNo">1419</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1419"></a>
+<span class="sourceLineNo">1420</span>      @Override<a name="line.1420"></a>
+<span class="sourceLineNo">1421</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1421"></a>
+<span class="sourceLineNo">1422</span>        throws IOException {<a name="line.1422"></a>
+<span class="sourceLineNo">1423</span>        oserver.postReplayWALs(ctx, info, edits);<a name="line.1423"></a>
+<span class="sourceLineNo">1424</span>      }<a name="line.1424"></a>
+<span class="sourceLineNo">1425</span>    });<a name="line.1425"></a>
+<span class="sourceLineNo">1426</span>  }<a name="line.1426"></a>
+<span class="sourceLineNo">1427</span><a name="line.1427"></a>
+<span class="sourceLineNo">1428</span>  /**<a name="line.1428"></a>
+<span class="sourceLineNo">1429</span>   * @param info<a name="line.1429"></a>
+<span class="sourceLineNo">1430</span>   * @param logKey<a name="line.1430"></a>
+<span class="sourceLineNo">1431</span>   * @param logEdit<a name="line.1431"></a>
+<span class="sourceLineNo">1432</span>   * @return true if default behavior should be bypassed, false otherwise<a name="line.1432"></a>
+<span class="sourceLineNo">1433</span>   * @throws IOException<a name="line.1433"></a>
+<span class="sourceLineNo">1434</span>   */<a name="line.1434"></a>
+<span class="sourceLineNo">1435</span>  public boolean preWALRestore(final HRegionInfo info, final WALKey logKey,<a name="line.1435"></a>
+<span class="sourceLineNo">1436</span>      final WALEdit logEdit) throws IOException {<a name="line.1436"></a>
+<span class="sourceLineNo">1437</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1437"></a>
+<span class="sourceLineNo">1438</span>      @Override<a name="line.1438"></a>
+<span class="sourceLineNo">1439</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1439"></a>
+<span class="sourceLineNo">1440</span>          throws IOException {<a name="line.1440"></a>
+<span class="sourceLineNo">1441</span>        oserver.preWALRestore(ctx, info, logKey, logEdit);<a name="line.1441"></a>
+<span class="sourceLineNo">1442</span>      }<a name="line.1442"></a>
+<span class="sourceLineNo">1443</span>    });<a name="line.1443"></a>
+<span class="sourceLineNo">1444</span>  }<a name="line.1444"></a>
+<span class="sourceLineNo">1445</span><a name="line.1445"></a>
+<span class="sourceLineNo">1446</span>  /**<a name="line.1446"></a>
+<span class="sourceLineNo">1447</span>   * @param info<a name="line.1447"></a>
+<span class="sourceLineNo">1448</span>   * @param logKey<a name="line.1448"></a>
+<span class="sourceLineNo">1449</span>   * @param logEdit<a name="line.1449"></a>
+<span class="sourceLineNo">1450</span>   * @throws IOException<a name="line.1450"></a>
+<span class="sourceLineNo">1451</span>   */<a name="line.1451"></a>
+<span class="sourceLineNo">1452</span>  public void postWALRestore(final HRegionInfo info, final WALKey logKey, final WALEdit logEdit)<a name="line.1452"></a>
+<span class="sourceLineNo">1453</span>      throws IOException {<a name="line.1453"></a>
+<span class="sourceLineNo">1454</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1454"></a>
+<span class="sourceLineNo">1455</span>      @Override<a name="line.1455"></a>
+<span class="sourceLineNo">1456</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1456"></a>
+<span class="sourceLineNo">1457</span>          throws IOException {<a name="line.1457"></a>
+<span class="sourceLineNo">1458</span>        oserver.postWALRestore(ctx, info, logKey, logEdit);<a name="line.1458"></a>
+<span class="sourceLineNo">1459</span>      }<a name="line.1459"></a>
+<span class="sourceLineNo">1460</span>    });<a name="line.1460"></a>
+<span class="sourceLineNo">1461</span>  }<a name="line.1461"></a>
+<span class="sourceLineNo">1462</span><a name="line.1462"></a>
+<span class="sourceLineNo">1463</span>  /**<a name="line.1463"></a>
+<span class="sourceLineNo">1464</span>   * @param familyPaths pairs of { CF, file path } submitted for bulk load<a name="line.1464"></a>
+<span class="sourceLineNo">1465</span>   * @return true if the default operation should be bypassed<a name="line.1465"></a>
+<span class="sourceLineNo">1466</span>   * @throws IOException<a name="line.1466"></a>
+<span class="sourceLineNo">1467</span>   */<a name="line.1467"></a>
+<span class="sourceLineNo">1468</span>  public boolean preBulkLoadHFile(final List&lt;Pair&lt;byte[], String&gt;&gt; familyPaths) throws IOException {<a name="line.1468"></a>
+<span class="sourceLineNo">1469</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1469"></a>
+<span class="sourceLineNo">1470</span>      @Override<a name="line.1470"></a>
+<span class="sourceLineNo">1471</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1471"></a>
+<span class="sourceLineNo">1472</span>          throws IOException {<a name="line.1472"></a>
+<span class="sourceLineNo">1473</span>        oserver.preBulkLoadHFile(ctx, familyPaths);<a name="line.1473"></a>
+<span class="sourceLineNo">1474</span>      }<a name="line.1474"></a>
+<span class="sourceLineNo">1475</span>    });<a name="line.1475"></a>
+<span class="sourceLineNo">1476</span>  }<a name="line.1476"></a>
+<span class="sourceLineNo">1477</span><a name="line.1477"></a>
+<span class="sourceLineNo">1478</span>  public boolean preCommitStoreFile(final byte[] family, final List&lt;Pair&lt;Path, Path&gt;&gt; pairs)<a name="line.1478"></a>
+<span class="sourceLineNo">1479</span>      throws IOException {<a name="line.1479"></a>
+<span class="sourceLineNo">1480</span>    return execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1480"></a>
+<span class="sourceLineNo">1481</span>      @Override<a name="line.1481"></a>
+<span class="sourceLineNo">1482</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1482"></a>
+<span class="sourceLineNo">1483</span>          throws IOException {<a name="line.1483"></a>
+<span class="sourceLineNo">1484</span>        oserver.preCommitStoreFile(ctx, family, pairs);<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>  }<a name="line.1487"></a>
+<span class="sourceLineNo">1488</span>  public void postCommitStoreFile(final byte[] family, Path srcPath, Path dstPath) throws IOException {<a name="line.1488"></a>
+<span class="sourceLineNo">1489</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1489"></a>
+<span class="sourceLineNo">1490</span>      @Override<a name="line.1490"></a>
+<span class="sourceLineNo">1491</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1491"></a>
+<span class="sourceLineNo">1492</span>          throws IOException {<a name="line.1492"></a>
+<span class="sourceLineNo">1493</span>        oserver.postCommitStoreFile(ctx, family, srcPath, dstPath);<a name="line.1493"></a>
+<span class="sourceLineNo">1494</span>      }<a name="line.1494"></a>
+<span class="sourceLineNo">1495</span>    });<a name="line.1495"></a>
+<span class="sourceLineNo">1496</span>  }<a name="line.1496"></a>
+<span class="sourceLineNo">1497</span><a name="line.1497"></a>
+<span class="sourceLineNo">1498</span>  /**<a name="line.1498"></a>
+<span class="sourceLineNo">1499</span>   * @param familyPaths pairs of { CF, file path } submitted for bulk load<a name="line.1499"></a>
+<span class="sourceLineNo">1500</span>   * @param map Map of CF to List of file paths for the final loaded files<a name="line.1500"></a>
+<span class="sourceLineNo">1501</span>   * @param hasLoaded whether load was successful or not<a name="line.1501"></a>
+<span class="sourceLineNo">1502</span>   * @return the possibly modified value of hasLoaded<a name="line.1502"></a>
+<span class="sourceLineNo">1503</span>   * @throws IOException<a name="line.1503"></a>
+<span class="sourceLineNo">1504</span>   */<a name="line.1504"></a>
+<span class="sourceLineNo">1505</span>  public boolean postBulkLoadHFile(final List&lt;Pair&lt;byte[], String&gt;&gt; familyPaths,<a name="line.1505"></a>
+<span class="sourceLineNo">1506</span>      Map&lt;byte[], List&lt;Path&gt;&gt; map, boolean hasLoaded) throws IOException {<a name="line.1506"></a>
+<span class="sourceLineNo">1507</span>    return execOperationWithResult(hasLoaded,<a name="line.1507"></a>
+<span class="sourceLineNo">1508</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;Boolean&gt;() {<a name="line.1508"></a>
+<span class="sourceLineNo">1509</span>      @Override<a name="line.1509"></a>
+<span class="sourceLineNo">1510</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1510"></a>
+<span class="sourceLineNo">1511</span>          throws IOException {<a name="line.1511"></a>
+<span class="sourceLineNo">1512</span>        setResult(oserver.postBulkLoadHFile(ctx, familyPaths, map, getResult()));<a name="line.1512"></a>
+<span class="sourceLineNo">1513</span>      }<a name="line.1513"></a>
+<span class="sourceLineNo">1514</span>    });<a name="line.1514"></a>
+<span class="sourceLineNo">1515</span>  }<a name="line.1515"></a>
+<span class="sourceLineNo">1516</span><a name="line.1516"></a>
+<span class="sourceLineNo">1517</span>  public void postStartRegionOperation(final Operation op) throws IOException {<a name="line.1517"></a>
+<span class="sourceLineNo">1518</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1518"></a>
+<span class="sourceLineNo">1519</span>      @Override<a name="line.1519"></a>
+<span class="sourceLineNo">1520</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1520"></a>
+<span class="sourceLineNo">1521</span>          throws IOException {<a name="line.1521"></a>
+<span class="sourceLineNo">1522</span>        oserver.postStartRegionOperation(ctx, op);<a name="line.1522"></a>
+<span class="sourceLineNo">1523</span>      }<a name="line.1523"></a>
+<span class="sourceLineNo">1524</span>    });<a name="line.1524"></a>
+<span class="sourceLineNo">1525</span>  }<a name="line.1525"></a>
+<span class="sourceLineNo">1526</span><a name="line.1526"></a>
+<span class="sourceLineNo">1527</span>  public void postCloseRegionOperation(final Operation op) throws IOException {<a name="line.1527"></a>
+<span class="sourceLineNo">1528</span>    execOperation(coprocessors.isEmpty() ? null : new RegionOperation() {<a name="line.1528"></a>
+<span class="sourceLineNo">1529</span>      @Override<a name="line.1529"></a>
+<span class="sourceLineNo">1530</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1530"></a>
+<span class="sourceLineNo">1531</span>          throws IOException {<a name="line.1531"></a>
+<span class="sourceLineNo">1532</span>        oserver.postCloseRegionOperation(ctx, op);<a name="line.1532"></a>
+<span class="sourceLineNo">1533</span>      }<a name="line.1533"></a>
+<span class="sourceLineNo">1534</span>    });<a name="line.1534"></a>
+<span class="sourceLineNo">1535</span>  }<a name="line.1535"></a>
+<span class="sourceLineNo">1536</span><a name="line.1536"></a>
+<span class="sourceLineNo">1537</span>  /**<a name="line.1537"></a>
+<span class="sourceLineNo">1538</span>   * @param fs fileystem to read from<a name="line.1538"></a>
+<span class="sourceLineNo">1539</span>   * @param p path to the file<a name="line.1539"></a>
+<span class="sourceLineNo">1540</span>   * @param in {@link FSDataInputStreamWrapper}<a name="line.1540"></a>
+<span class="sourceLineNo">1541</span>   * @param size Full size of the file<a name="line.1541"></a>
+<span class="sourceLineNo">1542</span>   * @param cacheConf<a name="line.1542"></a>
+<span class="sourceLineNo">1543</span>   * @param r original reference file. This will be not null only when reading a split file.<a name="line.1543"></a>
+<span class="sourceLineNo">1544</span>   * @return a Reader instance to use instead of the base reader if overriding<a name="line.1544"></a>
+<span class="sourceLineNo">1545</span>   * default behavior, null otherwise<a name="line.1545"></a>
+<span class="sourceLineNo">1546</span>   * @throws IOException<a name="line.1546"></a>
+<span class="sourceLineNo">1547</span>   */<a name="line.1547"></a>
+<span class="sourceLineNo">1548</span>  public StoreFileReader preStoreFileReaderOpen(final FileSystem fs, final Path p,<a name="line.1548"></a>
+<span class="sourceLineNo">1549</span>      final FSDataInputStreamWrapper in, final long size, final CacheConfig cacheConf,<a name="line.1549"></a>
+<span class="sourceLineNo">1550</span>      final Reference r) throws IOException {<a name="line.1550"></a>
+<span class="sourceLineNo">1551</span>    return execOperationWithResult(null,<a name="line.1551"></a>
+<span class="sourceLineNo">1552</span>        coprocessors.isEmpty() ? null : new RegionOperationWithResult&lt;StoreFileReader&gt;() {<a name="line.1552"></a>
+<span class="sourceLineNo">1553</span>      @Override<a name="line.1553"></a>
+<span class="sourceLineNo">1554</span>      public void call(RegionObserver oserver, ObserverContext&lt;RegionCoprocessorEnvironment&gt; ctx)<a name="line.1554"></a>
+<span class="sourceLineNo">1555</span>          throws IOException {<a name="line.1555"></a>
+<span class="sourceLineNo">1556</span>        setResult(oserver.preStoreFileReaderOpen(ctx, fs, p, in, size, cacheConf, r, getResult()));<a name="line.1556"></a>
+<span class="sourceLineNo">1557</span>      }<a name="line.1557"></a>
+<span class="sourceLineNo">1558</span>    });<a name="line.1558"></a>
+<span class="sourceLineNo">1559</span>  }<a name="line.1559"></a>
+<span class="sourceLineNo">1560</span><a name="line.1560"></a>
+<span class="sourceLineNo">1561</span>  /**<a name="line.1561"></a>
+<span class="sourceLineNo">1562</span>   * @param fs fileystem to read from<a name="line.1562"></a>
+<span class="sourceLineNo">1563</span>   * @param p path to the file<a name="line.1563"></a>
+<span class="sourceLineNo">1564</span>   * @param in {@link FSDataInputStreamWrapper}<a name="line.1564"></a>
+<span class="sourceLineNo">1565</span>   * @param size Full size of the file<a name="line.1565"></a>
+<span class="sourceLineNo">1566</span>   * @param cacheConf<a name="line.1566"></a>
+<span class="sourceLineNo">1567</span>   * @param r original reference file. This will be not null only when reading a split

<TRUNCATED>

Mime
View raw message