HBASE-22248 Removed deprecated CollectionUtils
This commit is contained in:
parent
cc9d401015
commit
409523b110
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.apache.hadoop.hbase.util;
|
|
||||||
|
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility methods for dealing with Collections, including treating null collections as empty.
|
|
||||||
* @deprecated Since 2.0.6/2.1.3/2.2.0
|
|
||||||
*/
|
|
||||||
@InterfaceAudience.Private
|
|
||||||
//HBASE-20215: Marking as deprecated. Although audience is private, there might be references to
|
|
||||||
//this class on some client classpath.
|
|
||||||
@Deprecated
|
|
||||||
public class CollectionUtils extends ConcurrentMapUtils {
|
|
||||||
|
|
||||||
}
|
|
|
@ -31,7 +31,7 @@ import org.apache.hadoop.hbase.metrics.MetricRegistry;
|
||||||
import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
|
import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
|
||||||
import org.apache.hadoop.hbase.metrics.MetricSet;
|
import org.apache.hadoop.hbase.metrics.MetricSet;
|
||||||
import org.apache.hadoop.hbase.metrics.Timer;
|
import org.apache.hadoop.hbase.metrics.Timer;
|
||||||
import org.apache.hadoop.hbase.util.CollectionUtils;
|
import org.apache.hadoop.hbase.util.ConcurrentMapUtils;
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +51,7 @@ public class MetricRegistryImpl implements MetricRegistry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Timer timer(String name) {
|
public Timer timer(String name) {
|
||||||
return (Timer) CollectionUtils.computeIfAbsent(metrics, name, this::createTimer);
|
return (Timer) ConcurrentMapUtils.computeIfAbsent(metrics, name, this::createTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Timer createTimer() {
|
protected Timer createTimer() {
|
||||||
|
@ -60,7 +60,7 @@ public class MetricRegistryImpl implements MetricRegistry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Histogram histogram(String name) {
|
public Histogram histogram(String name) {
|
||||||
return (Histogram) CollectionUtils.computeIfAbsent(metrics, name, this::createHistogram);
|
return (Histogram) ConcurrentMapUtils.computeIfAbsent(metrics, name, this::createHistogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Histogram createHistogram() {
|
protected Histogram createHistogram() {
|
||||||
|
@ -69,7 +69,7 @@ public class MetricRegistryImpl implements MetricRegistry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Meter meter(String name) {
|
public Meter meter(String name) {
|
||||||
return (Meter) CollectionUtils.computeIfAbsent(metrics, name, this::createMeter);
|
return (Meter) ConcurrentMapUtils.computeIfAbsent(metrics, name, this::createMeter);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Meter createMeter() {
|
protected Meter createMeter() {
|
||||||
|
@ -78,7 +78,7 @@ public class MetricRegistryImpl implements MetricRegistry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Counter counter(String name) {
|
public Counter counter(String name) {
|
||||||
return (Counter) CollectionUtils.computeIfAbsent(metrics, name, this::createCounter);
|
return (Counter) ConcurrentMapUtils.computeIfAbsent(metrics, name, this::createCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Counter createCounter() {
|
protected Counter createCounter() {
|
||||||
|
@ -92,7 +92,7 @@ public class MetricRegistryImpl implements MetricRegistry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Metric register(String name, Metric metric) {
|
public Metric register(String name, Metric metric) {
|
||||||
return CollectionUtils.computeIfAbsent(metrics, name, () -> metric);
|
return ConcurrentMapUtils.computeIfAbsent(metrics, name, () -> metric);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue