Merge branch 'master' into westmann/cleanup
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
index 4d5041a..c1f15ba 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
@@ -37,6 +37,7 @@
import edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider;
import edu.uci.ics.asterix.metadata.entities.DatasourceAdapter;
import edu.uci.ics.asterix.metadata.entities.DatasourceAdapter.AdapterType;
+import edu.uci.ics.asterix.metadata.entities.Datatype;
import edu.uci.ics.asterix.metadata.entities.Feed;
import edu.uci.ics.asterix.metadata.entities.FeedActivity;
import edu.uci.ics.asterix.metadata.entities.FeedActivity.FeedActivityType;
@@ -292,8 +293,12 @@
"You must specify the datatype associated with the incoming data. Datatype is specified by the "
+ IGenericAdapterFactory.KEY_TYPE_NAME + " configuration parameter");
}
- adapterOutputType = (ARecordType) MetadataManager.INSTANCE.getDatatype(mdTxnCtx,
- feed.getDataverseName(), outputTypeName).getDatatype();
+ Datatype datatype = MetadataManager.INSTANCE.getDatatype(mdTxnCtx,
+ feed.getDataverseName(), outputTypeName);
+ if (datatype == null) {
+ throw new Exception("no datatype \"" + outputTypeName + "\" in dataverse \"" + feed.getDataverseName() + "\"");
+ }
+ adapterOutputType = (ARecordType) datatype.getDatatype();
((IGenericAdapterFactory) adapterFactory).configure(configuration, (ARecordType) adapterOutputType);
break;
default:
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AUnorderedListType.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AUnorderedListType.java
index ffbc6e6..06a43c6 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AUnorderedListType.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AUnorderedListType.java
@@ -43,7 +43,7 @@
@Override
public String toString() {
- return "{ " + itemType + " }";
+ return "{{ " + itemType + " }}";
}
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixClusterProperties.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixClusterProperties.java
index 9af206bb..0eef5db 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixClusterProperties.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixClusterProperties.java
@@ -88,7 +88,7 @@
state = State.ACTIVE;
}
if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info(" Registering configuration parameters for node id" + nodeId);
+ LOGGER.info(" Registering configuration parameters for node id " + nodeId);
}
resetClusterPartitionConstraint();
}
@@ -106,7 +106,7 @@
Map<String, String> ncConfig = ncConfiguration.get(nodeId);
if (ncConfig == null) {
if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.warning("Configuration parameters for nodeId" + nodeId
+ LOGGER.warning("Configuration parameters for nodeId " + nodeId
+ " not found. The node has not joined yet or has left.");
}
return -1;
@@ -126,7 +126,7 @@
Map<String, String> ncConfig = ncConfiguration.get(nodeId);
if (ncConfig == null) {
if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.warning("Configuration parameters for nodeId" + nodeId
+ LOGGER.warning("Configuration parameters for nodeId " + nodeId
+ " not found. The node has not joined yet or has left.");
}
return null;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/formats/NonTaggedDataFormat.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/formats/NonTaggedDataFormat.java
index 5ae2459..835e7e1 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/formats/NonTaggedDataFormat.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/formats/NonTaggedDataFormat.java
@@ -912,21 +912,7 @@
@Override
public ITupleParserFactory createTupleParser(ARecordType recType, IParseFileSplitsDecl decl) {
- if (decl.isDelimitedFileFormat()) {
- int n = recType.getFieldTypes().length;
- IValueParserFactory[] fieldParserFactories = new IValueParserFactory[n];
- for (int i = 0; i < n; i++) {
- ATypeTag tag = recType.getFieldTypes()[i].getTypeTag();
- IValueParserFactory vpf = typeToValueParserFactMap.get(tag);
- if (vpf == null) {
- throw new NotImplementedException("No value parser factory for delimited fields of type " + tag);
- }
- fieldParserFactories[i] = vpf;
- }
- return new NtDelimitedDataTupleParserFactory(recType, fieldParserFactories, decl.getDelimChar());
- } else {
- return new AdmSchemafullRecordParserFactory(recType);
- }
+ return createTupleParser(recType, decl.isDelimitedFileFormat(), decl.getDelimChar());
}
@Override
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
index 3719726..39ada51 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
@@ -235,7 +235,7 @@
public String toString() {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < slots.size(); ++i) {
- sb.append(types.get(i) + " " + slots.get(i) + "\n");
+ sb.append(types.get(i) + " " + TypeUtil.Global.toString(slots.get(i)) + "\n");
}
return sb.toString();
}