|
19 | 19 |
|
20 | 20 | import java.io.IOException; |
21 | 21 | import java.util.ArrayList; |
22 | | -import java.util.Arrays; |
23 | 22 | import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionSummary; |
24 | 23 | import org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.DeletedBlocksTransaction; |
25 | 24 | import org.apache.hadoop.hdds.scm.block.DeletedBlockLogStateManager; |
@@ -146,57 +145,4 @@ public Message invokeLocal(String methodName, Object[] p) throws Exception { |
146 | 145 |
|
147 | 146 | return SCMRatisResponse.encode(returnValue, returnType); |
148 | 147 | } |
149 | | - |
150 | | - @Override |
151 | | - public Class<?> getReturnType(String methodName, Class<?>[] parameterTypes) { |
152 | | - switch (methodName) { |
153 | | - case "addTransactionsToDB": |
154 | | - if (Arrays.equals(parameterTypes, |
155 | | - new Class<?>[]{ArrayList.class})) { |
156 | | - return void.class; |
157 | | - } |
158 | | - if (Arrays.equals(parameterTypes, |
159 | | - new Class<?>[]{ArrayList.class, DeletedBlocksTransactionSummary.class})) { |
160 | | - return void.class; |
161 | | - } |
162 | | - break; |
163 | | - |
164 | | - case "getReadOnlyIterator": |
165 | | - if (parameterTypes == null || parameterTypes.length == 0) { |
166 | | - return Table.KeyValueIterator.class; |
167 | | - } |
168 | | - break; |
169 | | - |
170 | | - case "onFlush": |
171 | | - if (parameterTypes == null || parameterTypes.length == 0) { |
172 | | - return void.class; |
173 | | - } |
174 | | - break; |
175 | | - |
176 | | - case "reinitialize": |
177 | | - if (Arrays.equals(parameterTypes, |
178 | | - new Class<?>[]{Table.class, Table.class})) { |
179 | | - return void.class; |
180 | | - } |
181 | | - break; |
182 | | - |
183 | | - case "removeTransactionsFromDB": |
184 | | - if (Arrays.equals(parameterTypes, |
185 | | - new Class<?>[]{ArrayList.class})) { |
186 | | - return void.class; |
187 | | - } |
188 | | - if (Arrays.equals(parameterTypes, |
189 | | - new Class<?>[]{ArrayList.class, DeletedBlocksTransactionSummary.class})) { |
190 | | - return void.class; |
191 | | - } |
192 | | - break; |
193 | | - |
194 | | - default: |
195 | | - break; |
196 | | - } |
197 | | - |
198 | | - throw new IllegalArgumentException( |
199 | | - "Method not found: " + methodName |
200 | | - + " with parameterTypes in DeletedBlockLogStateManager"); |
201 | | - } |
202 | 148 | } |
0 commit comments