You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2022/12/16 18:47:21 UTC
[accumulo] branch main updated: Remove some unused code (#3128)
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new f202e9b539 Remove some unused code (#3128)
f202e9b539 is described below
commit f202e9b5391c4035f19e9093ca2430e7eb915652
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Fri Dec 16 13:47:16 2022 -0500
Remove some unused code (#3128)
This removes some unused iterator util serialization code that used libthrift
---
.../iteratorsImpl/system/SystemIteratorUtil.java | 37 ----------------------
1 file changed, 37 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/SystemIteratorUtil.java b/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/SystemIteratorUtil.java
index bac1d31ef1..cfad4ee1c9 100644
--- a/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/SystemIteratorUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/SystemIteratorUtil.java
@@ -32,10 +32,6 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.tabletserver.thrift.IteratorConfig;
import org.apache.accumulo.core.tabletserver.thrift.TIteratorSetting;
-import org.apache.thrift.TDeserializer;
-import org.apache.thrift.TException;
-import org.apache.thrift.TSerializer;
-import org.apache.thrift.protocol.TBinaryProtocol;
/**
* System utility class. Not for client use.
@@ -62,39 +58,6 @@ public class SystemIteratorUtil {
return new IteratorConfig(tisList);
}
- public static List<IteratorSetting> toIteratorSettings(IteratorConfig ic) {
- List<IteratorSetting> ret = new ArrayList<>();
- for (TIteratorSetting tIteratorSetting : ic.getIterators()) {
- ret.add(toIteratorSetting(tIteratorSetting));
- }
-
- return ret;
- }
-
- public static byte[] encodeIteratorSettings(IteratorConfig iterators) {
- try {
- TSerializer tser = new TSerializer(new TBinaryProtocol.Factory());
- return tser.serialize(iterators);
- } catch (TException e) {
- throw new RuntimeException(e);
- }
- }
-
- public static byte[] encodeIteratorSettings(List<IteratorSetting> iterators) {
- return encodeIteratorSettings(toIteratorConfig(iterators));
- }
-
- public static List<IteratorSetting> decodeIteratorSettings(byte[] enc) {
- IteratorConfig ic = new IteratorConfig();
- try {
- TDeserializer tdser = new TDeserializer(new TBinaryProtocol.Factory());
- tdser.deserialize(ic, enc);
- } catch (TException e) {
- throw new RuntimeException(e);
- }
- return toIteratorSettings(ic);
- }
-
public static SortedKeyValueIterator<Key,Value> setupSystemScanIterators(
SortedKeyValueIterator<Key,Value> source, Set<Column> cols, Authorizations auths,
byte[] defaultVisibility, AccumuloConfiguration conf) throws IOException {