You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2019/02/11 23:25:26 UTC
[accumulo] branch master updated: Changes to make 2.0 API more
backward compatible (#943)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push:
new 05f7baf Changes to make 2.0 API more backward compatible (#943)
05f7baf is described below
commit 05f7baf644817379060fd45197bac027c768b13d
Author: Mike Miller <mm...@apache.org>
AuthorDate: Mon Feb 11 18:25:22 2019 -0500
Changes to make 2.0 API more backward compatible (#943)
* Add default methods on interfaces and exception where it was removed
---
.../core/client/admin/TableOperations.java | 23 ++++++++++++++--------
.../core/client/mapred/AccumuloOutputFormat.java | 2 +-
.../apache/accumulo/core/client/rfile/RFile.java | 4 +++-
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
index 9ffcb1c..38dcb4d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
@@ -950,8 +950,9 @@ public interface TableOperations {
* @since 2.0.0
* @see Summarizer
*/
- SummaryRetriever summaries(String tableName)
- throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ default SummaryRetriever summaries(String tableName) {
+ throw new UnsupportedOperationException();
+ }
/**
* Enables summary generation for this table for future compactions.
@@ -968,8 +969,10 @@ public interface TableOperations {
* @see SummarizerConfiguration#toTableProperties(SummarizerConfiguration...)
* @see SummarizerConfiguration#toTableProperties(Collection)
*/
- void addSummarizers(String tableName, SummarizerConfiguration... summarizers)
- throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ default void addSummarizers(String tableName, SummarizerConfiguration... summarizers)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ throw new UnsupportedOperationException();
+ }
/**
* Removes summary generation for this table for the matching summarizers.
@@ -980,8 +983,10 @@ public interface TableOperations {
* removes all summarizers whose configuration that matches this predicate
* @since 2.0.0
*/
- void removeSummarizers(String tableName, Predicate<SummarizerConfiguration> predicate)
- throws AccumuloException, TableNotFoundException, AccumuloSecurityException;
+ default void removeSummarizers(String tableName, Predicate<SummarizerConfiguration> predicate)
+ throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
+ throw new UnsupportedOperationException();
+ }
/**
* @param tableName
@@ -990,6 +995,8 @@ public interface TableOperations {
* @since 2.0.0
* @see SummarizerConfiguration#fromTableProperties(Map)
*/
- List<SummarizerConfiguration> listSummarizers(String tableName)
- throws AccumuloException, TableNotFoundException, AccumuloSecurityException;
+ default List<SummarizerConfiguration> listSummarizers(String tableName)
+ throws AccumuloException, TableNotFoundException {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
index b4afe9c..9daadcc 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
@@ -424,7 +424,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
private AccumuloClient client;
protected AccumuloRecordWriter(JobConf job)
- throws AccumuloException, AccumuloSecurityException {
+ throws AccumuloException, AccumuloSecurityException, IOException {
Level l = getLogLevel(job);
if (l != null)
log.setLevel(getLogLevel(job));
diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFile.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFile.java
index 53039d5..825d802 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFile.java
@@ -408,7 +408,9 @@ public class RFile {
* Configuration for summarizer to run.
* @since 2.0.0
*/
- WriterOptions withSummarizers(SummarizerConfiguration... summarizerConf);
+ default WriterOptions withSummarizers(SummarizerConfiguration... summarizerConf) {
+ throw new UnsupportedOperationException();
+ }
/**
* An option to store sample data in the generated RFile.