http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html index 03692cd..a9dd1e3 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html @@ -2120,7 +2120,7 @@ <span class="sourceLineNo">2112</span><a name="line.2112"></a> <span class="sourceLineNo">2113</span> @Override<a name="line.2113"></a> <span class="sourceLineNo">2114</span> public void stop(final String msg) {<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser());<a name="line.2115"></a> +<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser().orElse(null));<a name="line.2115"></a> <span class="sourceLineNo">2116</span> }<a name="line.2116"></a> <span class="sourceLineNo">2117</span><a name="line.2117"></a> <span class="sourceLineNo">2118</span> /**<a name="line.2118"></a>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionInfo.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionInfo.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionInfo.html index 03692cd..a9dd1e3 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionInfo.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionInfo.html @@ -2120,7 +2120,7 @@ <span class="sourceLineNo">2112</span><a name="line.2112"></a> <span class="sourceLineNo">2113</span> @Override<a name="line.2113"></a> <span class="sourceLineNo">2114</span> public void stop(final String msg) {<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser());<a name="line.2115"></a> +<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser().orElse(null));<a name="line.2115"></a> <span class="sourceLineNo">2116</span> }<a name="line.2116"></a> <span class="sourceLineNo">2117</span><a name="line.2117"></a> <span class="sourceLineNo">2118</span> /**<a name="line.2118"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionsCleaner.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionsCleaner.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionsCleaner.html index 03692cd..a9dd1e3 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionsCleaner.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.MovedRegionsCleaner.html @@ -2120,7 +2120,7 @@ <span class="sourceLineNo">2112</span><a name="line.2112"></a> <span class="sourceLineNo">2113</span> @Override<a name="line.2113"></a> <span class="sourceLineNo">2114</span> public void stop(final String msg) {<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser());<a name="line.2115"></a> +<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser().orElse(null));<a name="line.2115"></a> <span class="sourceLineNo">2116</span> }<a name="line.2116"></a> <span class="sourceLineNo">2117</span><a name="line.2117"></a> <span class="sourceLineNo">2118</span> /**<a name="line.2118"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.PeriodicMemStoreFlusher.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.PeriodicMemStoreFlusher.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.PeriodicMemStoreFlusher.html index 03692cd..a9dd1e3 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.PeriodicMemStoreFlusher.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.PeriodicMemStoreFlusher.html @@ -2120,7 +2120,7 @@ <span class="sourceLineNo">2112</span><a name="line.2112"></a> <span class="sourceLineNo">2113</span> @Override<a name="line.2113"></a> <span class="sourceLineNo">2114</span> public void stop(final String msg) {<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser());<a name="line.2115"></a> +<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser().orElse(null));<a name="line.2115"></a> <span class="sourceLineNo">2116</span> }<a name="line.2116"></a> <span class="sourceLineNo">2117</span><a name="line.2117"></a> <span class="sourceLineNo">2118</span> /**<a name="line.2118"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.html index 03692cd..a9dd1e3 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.html @@ -2120,7 +2120,7 @@ <span class="sourceLineNo">2112</span><a name="line.2112"></a> <span class="sourceLineNo">2113</span> @Override<a name="line.2113"></a> <span class="sourceLineNo">2114</span> public void stop(final String msg) {<a name="line.2114"></a> -<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser());<a name="line.2115"></a> +<span class="sourceLineNo">2115</span> stop(msg, false, RpcServer.getRequestUser().orElse(null));<a name="line.2115"></a> <span class="sourceLineNo">2116</span> }<a name="line.2116"></a> <span class="sourceLineNo">2117</span><a name="line.2117"></a> <span class="sourceLineNo">2118</span> /**<a name="line.2118"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b838bdf0/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html index 9ec6b56..8802652 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html @@ -1555,11 +1555,11 @@ <span class="sourceLineNo">1547</span> // Quota support is enabled, the requesting user is not system/super user<a name="line.1547"></a> <span class="sourceLineNo">1548</span> // and a quota policy is enforced that disables compactions.<a name="line.1548"></a> <span class="sourceLineNo">1549</span> if (QuotaUtil.isQuotaEnabled(getConfiguration()) &&<a name="line.1549"></a> -<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser()) &&<a name="line.1550"></a> -<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager().areCompactionsDisabled(<a name="line.1551"></a> -<span class="sourceLineNo">1552</span> region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> -<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException("Compactions on this region are "<a name="line.1553"></a> -<span class="sourceLineNo">1554</span> + "disabled due to a space quota violation.");<a name="line.1554"></a> +<span class="sourceLineNo">1550</span> !Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null)) &&<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> this.regionServer.getRegionServerSpaceQuotaManager()<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> .areCompactionsDisabled(region.getTableDescriptor().getTableName())) {<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> throw new DoNotRetryIOException(<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> "Compactions on this region are " + "disabled due to a space quota violation.");<a name="line.1554"></a> <span class="sourceLineNo">1555</span> }<a name="line.1555"></a> <span class="sourceLineNo">1556</span> region.startRegionOperation(Operation.COMPACT_REGION);<a name="line.1556"></a> <span class="sourceLineNo">1557</span> LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString());<a name="line.1557"></a> @@ -1594,10 +1594,10 @@ <span class="sourceLineNo">1586</span> String log = "User-triggered " + (major ? "major " : "") + "compaction" + familyLogMsg;<a name="line.1586"></a> <span class="sourceLineNo">1587</span> if (family != null) {<a name="line.1587"></a> <span class="sourceLineNo">1588</span> regionServer.compactSplitThread.requestCompaction(region, store, log, Store.PRIORITY_USER,<a name="line.1588"></a> -<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1589"></a> +<span class="sourceLineNo">1589</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1589"></a> <span class="sourceLineNo">1590</span> } else {<a name="line.1590"></a> <span class="sourceLineNo">1591</span> regionServer.compactSplitThread.requestCompaction(region, log, Store.PRIORITY_USER,<a name="line.1591"></a> -<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser());<a name="line.1592"></a> +<span class="sourceLineNo">1592</span> CompactionLifeCycleTracker.DUMMY, RpcServer.getRequestUser().orElse(null));<a name="line.1592"></a> <span class="sourceLineNo">1593</span> }<a name="line.1593"></a> <span class="sourceLineNo">1594</span> return CompactRegionResponse.newBuilder().build();<a name="line.1594"></a> <span class="sourceLineNo">1595</span> } catch (IOException ie) {<a name="line.1595"></a> @@ -2415,7 +2415,7 @@ <span class="sourceLineNo">2407</span> ClientProtos.Get get = request.getGet();<a name="line.2407"></a> <span class="sourceLineNo">2408</span> Boolean existence = null;<a name="line.2408"></a> <span class="sourceLineNo">2409</span> Result r = null;<a name="line.2409"></a> -<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2410"></a> +<span class="sourceLineNo">2410</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2410"></a> <span class="sourceLineNo">2411</span> quota = getRpcQuotaManager().checkQuota(region, OperationQuota.OperationType.GET);<a name="line.2411"></a> <span class="sourceLineNo">2412</span><a name="line.2412"></a> <span class="sourceLineNo">2413</span> Get clientGet = ProtobufUtil.toGet(get);<a name="line.2413"></a> @@ -2566,7 +2566,7 @@ <span class="sourceLineNo">2558</span> RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();<a name="line.2558"></a> <span class="sourceLineNo">2559</span> Boolean processed = null;<a name="line.2559"></a> <span class="sourceLineNo">2560</span> RegionScannersCloseCallBack closeCallBack = null;<a name="line.2560"></a> -<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2561"></a> +<span class="sourceLineNo">2561</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2561"></a> <span class="sourceLineNo">2562</span> this.rpcMultiRequestCount.increment();<a name="line.2562"></a> <span class="sourceLineNo">2563</span> this.requestCount.increment();<a name="line.2563"></a> <span class="sourceLineNo">2564</span> Map<RegionSpecifier, ClientProtos.RegionLoadStats> regionStats = new HashMap<>(request<a name="line.2564"></a> @@ -2697,7 +2697,7 @@ <span class="sourceLineNo">2689</span> HBaseRpcController controller = (HBaseRpcController)rpcc;<a name="line.2689"></a> <span class="sourceLineNo">2690</span> CellScanner cellScanner = controller != null ? controller.cellScanner() : null;<a name="line.2690"></a> <span class="sourceLineNo">2691</span> OperationQuota quota = null;<a name="line.2691"></a> -<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.2692"></a> +<span class="sourceLineNo">2692</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.2692"></a> <span class="sourceLineNo">2693</span> ActivePolicyEnforcement spaceQuotaEnforcement = null;<a name="line.2693"></a> <span class="sourceLineNo">2694</span> MutationType type = null;<a name="line.2694"></a> <span class="sourceLineNo">2695</span> long before = EnvironmentEdgeManager.currentTime();<a name="line.2695"></a> @@ -3277,7 +3277,7 @@ <span class="sourceLineNo">3269</span> } else {<a name="line.3269"></a> <span class="sourceLineNo">3270</span> rows = closeScanner ? 0 : 1;<a name="line.3270"></a> <span class="sourceLineNo">3271</span> }<a name="line.3271"></a> -<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall();<a name="line.3272"></a> +<span class="sourceLineNo">3272</span> RpcCallContext context = RpcServer.getCurrentCall().orElse(null);<a name="line.3272"></a> <span class="sourceLineNo">3273</span> // now let's do the real scan.<a name="line.3273"></a> <span class="sourceLineNo">3274</span> long maxQuotaResultSize = Math.min(maxScannerResultSize, quota.getReadAvailable());<a name="line.3274"></a> <span class="sourceLineNo">3275</span> RegionScanner scanner = rsh.s;<a name="line.3275"></a> @@ -3289,7 +3289,7 @@ <span class="sourceLineNo">3281</span> } else {<a name="line.3281"></a> <span class="sourceLineNo">3282</span> limitOfRows = -1;<a name="line.3282"></a> <span class="sourceLineNo">3283</span> }<a name="line.3283"></a> -<span class="sourceLineNo">3284</span> MutableObject lastBlock = new MutableObject();<a name="line.3284"></a> +<span class="sourceLineNo">3284</span> MutableObject<Object> lastBlock = new MutableObject<>();<a name="line.3284"></a> <span class="sourceLineNo">3285</span> boolean scannerClosed = false;<a name="line.3285"></a> <span class="sourceLineNo">3286</span> try {<a name="line.3286"></a> <span class="sourceLineNo">3287</span> List<Result> results = new ArrayList<>();<a name="line.3287"></a>