DRILL-5763: Fix NPE during MapRDBSubScan deserialization close apache/drill#931
Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e57514aa Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e57514aa Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e57514aa Branch: refs/heads/master Commit: e57514aad09985cd48ee5d3bf39f21af3ceaf510 Parents: 6829af0 Author: Arina Ielchiieva <arina.yelchiy...@gmail.com> Authored: Fri Sep 1 14:51:46 2017 +0300 Committer: Aman Sinha <asi...@maprtech.com> Committed: Mon Sep 4 09:23:23 2017 -0700 ---------------------------------------------------------------------- .../drill/exec/store/mapr/db/MapRDBSubScan.java | 27 +++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/e57514aa/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java ---------------------------------------------------------------------- diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java index 98335f3..9547186 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java @@ -71,14 +71,32 @@ public class MapRDBSubScan extends AbstractBase implements SubScan { this.tableType = tableType; } + + @JsonProperty("formatPluginConfig") + public MapRDBFormatPluginConfig getFormatPluginConfig() { + return (MapRDBFormatPluginConfig) formatPlugin.getConfig(); + } + + @JsonProperty("storageConfig") + public StoragePluginConfig getStorageConfig(){ + return formatPlugin.getStorageConfig(); + } + + @JsonProperty("regionScanSpecList") public List<MapRDBSubScanSpec> getRegionScanSpecList() { return regionScanSpecList; } + @JsonProperty("columns") public List<SchemaPath> getColumns() { return columns; } + @JsonProperty("tableType") + public String getTableType() { + return tableType; + } + @Override public boolean isExecutable() { return false; @@ -105,18 +123,9 @@ public class MapRDBSubScan extends AbstractBase implements SubScan { return 1001; } - public String getTableType() { - return tableType; - } - @JsonIgnore public MapRDBFormatPlugin getFormatPlugin() { return formatPlugin; } - @JsonIgnore - public MapRDBFormatPluginConfig getFormatPluginConfig() { - return (MapRDBFormatPluginConfig) formatPlugin.getConfig(); - } - }