2626import java .util .Map ;
2727import java .util .regex .Pattern ;
2828
29- import org .apache .hadoop .conf .Configuration ;
3029import org .apache .hadoop .hbase .HConstants ;
3130import org .apache .hadoop .hbase .client .Connection ;
32- import org .apache .hadoop .hbase .client .ConnectionFactory ;
3331import org .apache .hadoop .hbase .client .Table ;
3432import org .apache .hadoop .hbase .client .coprocessor .Batch ;
3533import org .apache .hadoop .hbase .client .security .SecurityCapability ;
@@ -66,23 +64,6 @@ public static boolean isCellVisibilityEnabled(Connection connection) throws IOEx
6664 .contains (SecurityCapability .CELL_VISIBILITY );
6765 }
6866
69- /**
70- * Utility method for adding label to the system.
71- *
72- * @param conf
73- * @param label
74- * @return VisibilityLabelsResponse
75- * @throws Throwable
76- * @deprecated Use {@link #addLabel(Connection,String)} instead.
77- */
78- @ Deprecated
79- public static VisibilityLabelsResponse addLabel (Configuration conf , final String label )
80- throws Throwable {
81- try (Connection connection = ConnectionFactory .createConnection (conf )) {
82- return addLabels (connection , new String [] { label });
83- }
84- }
85-
8667 /**
8768 * Utility method for adding label to the system.
8869 *
@@ -96,23 +77,6 @@ public static VisibilityLabelsResponse addLabel(Connection connection, final Str
9677 return addLabels (connection , new String [] { label });
9778 }
9879
99- /**
100- * Utility method for adding labels to the system.
101- *
102- * @param conf
103- * @param labels
104- * @return VisibilityLabelsResponse
105- * @throws Throwable
106- * @deprecated Use {@link #addLabels(Connection,String[])} instead.
107- */
108- @ Deprecated
109- public static VisibilityLabelsResponse addLabels (Configuration conf , final String [] labels )
110- throws Throwable {
111- try (Connection connection = ConnectionFactory .createConnection (conf )) {
112- return addLabels (connection , labels );
113- }
114- }
115-
11680 /**
11781 * Utility method for adding labels to the system.
11882 *
@@ -156,23 +120,6 @@ public VisibilityLabelsResponse call(VisibilityLabelsService service) throws IOE
156120 }
157121 }
158122
159- /**
160- * Sets given labels globally authorized for the user.
161- * @param conf
162- * @param auths
163- * @param user
164- * @return VisibilityLabelsResponse
165- * @throws Throwable
166- * @deprecated Use {@link #setAuths(Connection,String[],String)} instead.
167- */
168- @ Deprecated
169- public static VisibilityLabelsResponse setAuths (Configuration conf , final String [] auths ,
170- final String user ) throws Throwable {
171- try (Connection connection = ConnectionFactory .createConnection (conf )) {
172- return setOrClearAuths (connection , auths , user , true );
173- }
174- }
175-
176123 /**
177124 * Sets given labels globally authorized for the user.
178125 * @param connection
@@ -186,20 +133,6 @@ public static VisibilityLabelsResponse setAuths(Connection connection, final Str
186133 return setOrClearAuths (connection , auths , user , true );
187134 }
188135
189- /**
190- * @param conf
191- * @param user
192- * @return labels, the given user is globally authorized for.
193- * @throws Throwable
194- * @deprecated Use {@link #getAuths(Connection,String)} instead.
195- */
196- @ Deprecated
197- public static GetAuthsResponse getAuths (Configuration conf , final String user ) throws Throwable {
198- try (Connection connection = ConnectionFactory .createConnection (conf )) {
199- return getAuths (connection , user );
200- }
201- }
202-
203136 /**
204137 * @param connection the Connection instance to use.
205138 * @param user
@@ -235,22 +168,6 @@ public GetAuthsResponse call(VisibilityLabelsService service) throws IOException
235168 }
236169 }
237170
238- /**
239- * Retrieve the list of visibility labels defined in the system.
240- * @param conf
241- * @param regex The regular expression to filter which labels are returned.
242- * @return labels The list of visibility labels defined in the system.
243- * @throws Throwable
244- * @deprecated Use {@link #listLabels(Connection,String)} instead.
245- */
246- @ Deprecated
247- public static ListLabelsResponse listLabels (Configuration conf , final String regex )
248- throws Throwable {
249- try (Connection connection = ConnectionFactory .createConnection (conf )){
250- return listLabels (connection , regex );
251- }
252- }
253-
254171 /**
255172 * Retrieve the list of visibility labels defined in the system.
256173 * @param connection The Connection instance to use.
@@ -291,23 +208,6 @@ public ListLabelsResponse call(VisibilityLabelsService service) throws IOExcepti
291208 }
292209 }
293210
294- /**
295- * Removes given labels from user's globally authorized list of labels.
296- * @param conf
297- * @param auths
298- * @param user
299- * @return VisibilityLabelsResponse
300- * @throws Throwable
301- * @deprecated Use {@link #clearAuths(Connection,String[],String)} instead.
302- */
303- @ Deprecated
304- public static VisibilityLabelsResponse clearAuths (Configuration conf , final String [] auths ,
305- final String user ) throws Throwable {
306- try (Connection connection = ConnectionFactory .createConnection (conf )) {
307- return setOrClearAuths (connection , auths , user , false );
308- }
309- }
310-
311211 /**
312212 * Removes given labels from user's globally authorized list of labels.
313213 * @param connection
0 commit comments