You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2015/08/25 01:28:09 UTC
[2/2] accumulo git commit: ACCUMULO-3735 allow users to see the bulk
imports in progress
ACCUMULO-3735 allow users to see the bulk imports in progress
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/784bd05a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/784bd05a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/784bd05a
Branch: refs/heads/master
Commit: 784bd05a0038f8bc7b55f886e71e0b5e06eac316
Parents: 5e1c0d1
Author: Eric C. Newton <er...@gmail.com>
Authored: Mon Aug 24 19:27:38 2015 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Mon Aug 24 19:27:38 2015 -0400
----------------------------------------------------------------------
.../core/master/thrift/BulkImportState.java | 76 +++
.../core/master/thrift/BulkImportStatus.java | 618 +++++++++++++++++++
.../core/master/thrift/FateService.java | 76 +--
.../core/master/thrift/MasterClientService.java | 64 +-
.../core/master/thrift/MasterMonitorInfo.java | 358 ++++++++---
.../core/master/thrift/TabletServerStatus.java | 214 ++++++-
.../core/master/thrift/TabletSplit.java | 36 +-
core/src/main/thrift/master.thrift | 24 +
.../server/client/ClientServiceHandler.java | 16 +-
.../server/util/ServerBulkImportStatus.java | 51 ++
.../accumulo/master/FateServiceHandler.java | 2 +
.../java/org/apache/accumulo/master/Master.java | 14 +-
.../accumulo/master/tableOps/BulkImport.java | 7 +-
.../master/tableOps/CleanUpBulkImport.java | 3 +
.../accumulo/master/tableOps/CopyFailed.java | 3 +-
.../accumulo/master/tableOps/LoadFiles.java | 5 +-
.../org/apache/accumulo/monitor/Monitor.java | 2 +
.../accumulo/monitor/servlets/BasicServlet.java | 1 +
.../monitor/servlets/BulkImportServlet.java | 91 +++
.../util/celltypes/BulkImportStateType.java | 29 +
.../apache/accumulo/tserver/TabletServer.java | 18 +-
.../apache/accumulo/tserver/tablet/Tablet.java | 8 +-
.../accumulo/test/BulkImportMonitoringIT.java | 129 ++++
.../apache/accumulo/test/GetFileInfoBulkIT.java | 2 +-
.../apache/accumulo/test/GetMasterStats.java | 14 +
25 files changed, 1629 insertions(+), 232 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
new file mode 100644
index 0000000..861d3b9
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.master.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings({"unused"}) public enum BulkImportState implements org.apache.thrift.TEnum {
+ INITIAL(0),
+ MOVING(1),
+ PROCESSING(2),
+ ASSIGNING(3),
+ LOADING(4),
+ COPY_FILES(5),
+ CLEANUP(6);
+
+ private final int value;
+
+ private BulkImportState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static BulkImportState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return INITIAL;
+ case 1:
+ return MOVING;
+ case 2:
+ return PROCESSING;
+ case 3:
+ return ASSIGNING;
+ case 4:
+ return LOADING;
+ case 5:
+ return COPY_FILES;
+ case 6:
+ return CLEANUP;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
new file mode 100644
index 0000000..36b3d8e
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
@@ -0,0 +1,618 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.master.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatus, BulkImportStatus._Fields>, java.io.Serializable, Cloneable, Comparable<BulkImportStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BulkImportStatus");
+
+ private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField FILENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("filename", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BulkImportStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BulkImportStatusTupleSchemeFactory());
+ }
+
+ public long startTime; // required
+ public String filename; // required
+ /**
+ *
+ * @see BulkImportState
+ */
+ public BulkImportState state; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ START_TIME((short)1, "startTime"),
+ FILENAME((short)2, "filename"),
+ /**
+ *
+ * @see BulkImportState
+ */
+ STATE((short)3, "state");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // START_TIME
+ return START_TIME;
+ case 2: // FILENAME
+ return FILENAME;
+ case 3: // STATE
+ return STATE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __STARTTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.FILENAME, new org.apache.thrift.meta_data.FieldMetaData("filename", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BulkImportState.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkImportStatus.class, metaDataMap);
+ }
+
+ public BulkImportStatus() {
+ }
+
+ public BulkImportStatus(
+ long startTime,
+ String filename,
+ BulkImportState state)
+ {
+ this();
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ this.filename = filename;
+ this.state = state;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public BulkImportStatus(BulkImportStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.startTime = other.startTime;
+ if (other.isSetFilename()) {
+ this.filename = other.filename;
+ }
+ if (other.isSetState()) {
+ this.state = other.state;
+ }
+ }
+
+ public BulkImportStatus deepCopy() {
+ return new BulkImportStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ setStartTimeIsSet(false);
+ this.startTime = 0;
+ this.filename = null;
+ this.state = null;
+ }
+
+ public long getStartTime() {
+ return this.startTime;
+ }
+
+ public BulkImportStatus setStartTime(long startTime) {
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ public void setStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ }
+
+ public String getFilename() {
+ return this.filename;
+ }
+
+ public BulkImportStatus setFilename(String filename) {
+ this.filename = filename;
+ return this;
+ }
+
+ public void unsetFilename() {
+ this.filename = null;
+ }
+
+ /** Returns true if field filename is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilename() {
+ return this.filename != null;
+ }
+
+ public void setFilenameIsSet(boolean value) {
+ if (!value) {
+ this.filename = null;
+ }
+ }
+
+ /**
+ *
+ * @see BulkImportState
+ */
+ public BulkImportState getState() {
+ return this.state;
+ }
+
+ /**
+ *
+ * @see BulkImportState
+ */
+ public BulkImportStatus setState(BulkImportState state) {
+ this.state = state;
+ return this;
+ }
+
+ public void unsetState() {
+ this.state = null;
+ }
+
+ /** Returns true if field state is set (has been assigned a value) and false otherwise */
+ public boolean isSetState() {
+ return this.state != null;
+ }
+
+ public void setStateIsSet(boolean value) {
+ if (!value) {
+ this.state = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case START_TIME:
+ if (value == null) {
+ unsetStartTime();
+ } else {
+ setStartTime((Long)value);
+ }
+ break;
+
+ case FILENAME:
+ if (value == null) {
+ unsetFilename();
+ } else {
+ setFilename((String)value);
+ }
+ break;
+
+ case STATE:
+ if (value == null) {
+ unsetState();
+ } else {
+ setState((BulkImportState)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case START_TIME:
+ return Long.valueOf(getStartTime());
+
+ case FILENAME:
+ return getFilename();
+
+ case STATE:
+ return getState();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case START_TIME:
+ return isSetStartTime();
+ case FILENAME:
+ return isSetFilename();
+ case STATE:
+ return isSetState();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BulkImportStatus)
+ return this.equals((BulkImportStatus)that);
+ return false;
+ }
+
+ public boolean equals(BulkImportStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_startTime = true;
+ boolean that_present_startTime = true;
+ if (this_present_startTime || that_present_startTime) {
+ if (!(this_present_startTime && that_present_startTime))
+ return false;
+ if (this.startTime != that.startTime)
+ return false;
+ }
+
+ boolean this_present_filename = true && this.isSetFilename();
+ boolean that_present_filename = true && that.isSetFilename();
+ if (this_present_filename || that_present_filename) {
+ if (!(this_present_filename && that_present_filename))
+ return false;
+ if (!this.filename.equals(that.filename))
+ return false;
+ }
+
+ boolean this_present_state = true && this.isSetState();
+ boolean that_present_state = true && that.isSetState();
+ if (this_present_state || that_present_state) {
+ if (!(this_present_state && that_present_state))
+ return false;
+ if (!this.state.equals(that.state))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(BulkImportStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFilename()).compareTo(other.isSetFilename());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilename()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filename, other.filename);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("BulkImportStatus(");
+ boolean first = true;
+
+ sb.append("startTime:");
+ sb.append(this.startTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("filename:");
+ if (this.filename == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.filename);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("state:");
+ if (this.state == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.state);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class BulkImportStatusStandardSchemeFactory implements SchemeFactory {
+ public BulkImportStatusStandardScheme getScheme() {
+ return new BulkImportStatusStandardScheme();
+ }
+ }
+
+ private static class BulkImportStatusStandardScheme extends StandardScheme<BulkImportStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BulkImportStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // FILENAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.filename = iprot.readString();
+ struct.setFilenameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.state = BulkImportState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, BulkImportStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.startTime);
+ oprot.writeFieldEnd();
+ if (struct.filename != null) {
+ oprot.writeFieldBegin(FILENAME_FIELD_DESC);
+ oprot.writeString(struct.filename);
+ oprot.writeFieldEnd();
+ }
+ if (struct.state != null) {
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
+ oprot.writeI32(struct.state.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BulkImportStatusTupleSchemeFactory implements SchemeFactory {
+ public BulkImportStatusTupleScheme getScheme() {
+ return new BulkImportStatusTupleScheme();
+ }
+ }
+
+ private static class BulkImportStatusTupleScheme extends TupleScheme<BulkImportStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BulkImportStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStartTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFilename()) {
+ optionals.set(1);
+ }
+ if (struct.isSetState()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetStartTime()) {
+ oprot.writeI64(struct.startTime);
+ }
+ if (struct.isSetFilename()) {
+ oprot.writeString(struct.filename);
+ }
+ if (struct.isSetState()) {
+ oprot.writeI32(struct.state.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BulkImportStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.filename = iprot.readString();
+ struct.setFilenameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.state = BulkImportState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
index 27a9d0d..352d891 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
@@ -2522,13 +2522,13 @@ import org.slf4j.LoggerFactory;
case 4: // ARGUMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
- struct.arguments = new ArrayList<ByteBuffer>(_list70.size);
- for (int _i71 = 0; _i71 < _list70.size; ++_i71)
+ org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
+ struct.arguments = new ArrayList<ByteBuffer>(_list86.size);
+ for (int _i87 = 0; _i87 < _list86.size; ++_i87)
{
- ByteBuffer _elem72;
- _elem72 = iprot.readBinary();
- struct.arguments.add(_elem72);
+ ByteBuffer _elem88;
+ _elem88 = iprot.readBinary();
+ struct.arguments.add(_elem88);
}
iprot.readListEnd();
}
@@ -2540,15 +2540,15 @@ import org.slf4j.LoggerFactory;
case 5: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
- struct.options = new HashMap<String,String>(2*_map73.size);
- for (int _i74 = 0; _i74 < _map73.size; ++_i74)
+ org.apache.thrift.protocol.TMap _map89 = iprot.readMapBegin();
+ struct.options = new HashMap<String,String>(2*_map89.size);
+ for (int _i90 = 0; _i90 < _map89.size; ++_i90)
{
- String _key75;
- String _val76;
- _key75 = iprot.readString();
- _val76 = iprot.readString();
- struct.options.put(_key75, _val76);
+ String _key91;
+ String _val92;
+ _key91 = iprot.readString();
+ _val92 = iprot.readString();
+ struct.options.put(_key91, _val92);
}
iprot.readMapEnd();
}
@@ -2597,9 +2597,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.arguments.size()));
- for (ByteBuffer _iter77 : struct.arguments)
+ for (ByteBuffer _iter93 : struct.arguments)
{
- oprot.writeBinary(_iter77);
+ oprot.writeBinary(_iter93);
}
oprot.writeListEnd();
}
@@ -2609,10 +2609,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.options.size()));
- for (Map.Entry<String, String> _iter78 : struct.options.entrySet())
+ for (Map.Entry<String, String> _iter94 : struct.options.entrySet())
{
- oprot.writeString(_iter78.getKey());
- oprot.writeString(_iter78.getValue());
+ oprot.writeString(_iter94.getKey());
+ oprot.writeString(_iter94.getValue());
}
oprot.writeMapEnd();
}
@@ -2681,19 +2681,19 @@ import org.slf4j.LoggerFactory;
if (struct.isSetArguments()) {
{
oprot.writeI32(struct.arguments.size());
- for (ByteBuffer _iter79 : struct.arguments)
+ for (ByteBuffer _iter95 : struct.arguments)
{
- oprot.writeBinary(_iter79);
+ oprot.writeBinary(_iter95);
}
}
}
if (struct.isSetOptions()) {
{
oprot.writeI32(struct.options.size());
- for (Map.Entry<String, String> _iter80 : struct.options.entrySet())
+ for (Map.Entry<String, String> _iter96 : struct.options.entrySet())
{
- oprot.writeString(_iter80.getKey());
- oprot.writeString(_iter80.getValue());
+ oprot.writeString(_iter96.getKey());
+ oprot.writeString(_iter96.getValue());
}
}
}
@@ -2726,28 +2726,28 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(4)) {
{
- org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.arguments = new ArrayList<ByteBuffer>(_list81.size);
- for (int _i82 = 0; _i82 < _list81.size; ++_i82)
+ org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.arguments = new ArrayList<ByteBuffer>(_list97.size);
+ for (int _i98 = 0; _i98 < _list97.size; ++_i98)
{
- ByteBuffer _elem83;
- _elem83 = iprot.readBinary();
- struct.arguments.add(_elem83);
+ ByteBuffer _elem99;
+ _elem99 = iprot.readBinary();
+ struct.arguments.add(_elem99);
}
}
struct.setArgumentsIsSet(true);
}
if (incoming.get(5)) {
{
- org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.options = new HashMap<String,String>(2*_map84.size);
- for (int _i85 = 0; _i85 < _map84.size; ++_i85)
+ org.apache.thrift.protocol.TMap _map100 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.options = new HashMap<String,String>(2*_map100.size);
+ for (int _i101 = 0; _i101 < _map100.size; ++_i101)
{
- String _key86;
- String _val87;
- _key86 = iprot.readString();
- _val87 = iprot.readString();
- struct.options.put(_key86, _val87);
+ String _key102;
+ String _val103;
+ _key102 = iprot.readString();
+ _val103 = iprot.readString();
+ struct.options.put(_key102, _val103);
}
}
struct.setOptionsIsSet(true);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
index 63a2131..0885d4c 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
@@ -18717,13 +18717,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list88.size);
- for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+ org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list104.size);
+ for (int _i105 = 0; _i105 < _list104.size; ++_i105)
{
- String _elem90;
- _elem90 = iprot.readString();
- struct.success.add(_elem90);
+ String _elem106;
+ _elem106 = iprot.readString();
+ struct.success.add(_elem106);
}
iprot.readListEnd();
}
@@ -18760,9 +18760,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter91 : struct.success)
+ for (String _iter107 : struct.success)
{
- oprot.writeString(_iter91);
+ oprot.writeString(_iter107);
}
oprot.writeListEnd();
}
@@ -18801,9 +18801,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter92 : struct.success)
+ for (String _iter108 : struct.success)
{
- oprot.writeString(_iter92);
+ oprot.writeString(_iter108);
}
}
}
@@ -18818,13 +18818,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list93.size);
- for (int _i94 = 0; _i94 < _list93.size; ++_i94)
+ org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list109.size);
+ for (int _i110 = 0; _i110 < _list109.size; ++_i110)
{
- String _elem95;
- _elem95 = iprot.readString();
- struct.success.add(_elem95);
+ String _elem111;
+ _elem111 = iprot.readString();
+ struct.success.add(_elem111);
}
}
struct.setSuccessIsSet(true);
@@ -20438,13 +20438,13 @@ import org.slf4j.LoggerFactory;
case 4: // LOGS_TO_WATCH
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set96 = iprot.readSetBegin();
- struct.logsToWatch = new HashSet<String>(2*_set96.size);
- for (int _i97 = 0; _i97 < _set96.size; ++_i97)
+ org.apache.thrift.protocol.TSet _set112 = iprot.readSetBegin();
+ struct.logsToWatch = new HashSet<String>(2*_set112.size);
+ for (int _i113 = 0; _i113 < _set112.size; ++_i113)
{
- String _elem98;
- _elem98 = iprot.readString();
- struct.logsToWatch.add(_elem98);
+ String _elem114;
+ _elem114 = iprot.readString();
+ struct.logsToWatch.add(_elem114);
}
iprot.readSetEnd();
}
@@ -20487,9 +20487,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(LOGS_TO_WATCH_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.logsToWatch.size()));
- for (String _iter99 : struct.logsToWatch)
+ for (String _iter115 : struct.logsToWatch)
{
- oprot.writeString(_iter99);
+ oprot.writeString(_iter115);
}
oprot.writeSetEnd();
}
@@ -20538,9 +20538,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetLogsToWatch()) {
{
oprot.writeI32(struct.logsToWatch.size());
- for (String _iter100 : struct.logsToWatch)
+ for (String _iter116 : struct.logsToWatch)
{
- oprot.writeString(_iter100);
+ oprot.writeString(_iter116);
}
}
}
@@ -20566,13 +20566,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TSet _set101 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.logsToWatch = new HashSet<String>(2*_set101.size);
- for (int _i102 = 0; _i102 < _set101.size; ++_i102)
+ org.apache.thrift.protocol.TSet _set117 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.logsToWatch = new HashSet<String>(2*_set117.size);
+ for (int _i118 = 0; _i118 < _set117.size; ++_i118)
{
- String _elem103;
- _elem103 = iprot.readString();
- struct.logsToWatch.add(_elem103);
+ String _elem119;
+ _elem119 = iprot.readString();
+ struct.logsToWatch.add(_elem119);
}
}
struct.setLogsToWatchIsSet(true);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
index 990fc89..bf9befb 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
@@ -59,6 +59,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField UNASSIGNED_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("unassignedTablets", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.protocol.TField SERVERS_SHUTTING_DOWN_FIELD_DESC = new org.apache.thrift.protocol.TField("serversShuttingDown", org.apache.thrift.protocol.TType.SET, (short)9);
private static final org.apache.thrift.protocol.TField DEAD_TABLET_SERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadTabletServers", org.apache.thrift.protocol.TType.LIST, (short)10);
+ private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)11);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -82,6 +83,7 @@ import org.slf4j.LoggerFactory;
public int unassignedTablets; // required
public Set<String> serversShuttingDown; // required
public List<DeadServer> deadTabletServers; // required
+ public List<BulkImportStatus> bulkImports; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -100,7 +102,8 @@ import org.slf4j.LoggerFactory;
GOAL_STATE((short)8, "goalState"),
UNASSIGNED_TABLETS((short)7, "unassignedTablets"),
SERVERS_SHUTTING_DOWN((short)9, "serversShuttingDown"),
- DEAD_TABLET_SERVERS((short)10, "deadTabletServers");
+ DEAD_TABLET_SERVERS((short)10, "deadTabletServers"),
+ BULK_IMPORTS((short)11, "bulkImports");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -131,6 +134,8 @@ import org.slf4j.LoggerFactory;
return SERVERS_SHUTTING_DOWN;
case 10: // DEAD_TABLET_SERVERS
return DEAD_TABLET_SERVERS;
+ case 11: // BULK_IMPORTS
+ return BULK_IMPORTS;
default:
return null;
}
@@ -199,6 +204,9 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.DEAD_TABLET_SERVERS, new org.apache.thrift.meta_data.FieldMetaData("deadTabletServers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeadServer.class))));
+ tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkImportStatus.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterMonitorInfo.class, metaDataMap);
}
@@ -214,7 +222,8 @@ import org.slf4j.LoggerFactory;
MasterGoalState goalState,
int unassignedTablets,
Set<String> serversShuttingDown,
- List<DeadServer> deadTabletServers)
+ List<DeadServer> deadTabletServers,
+ List<BulkImportStatus> bulkImports)
{
this();
this.tableMap = tableMap;
@@ -226,6 +235,7 @@ import org.slf4j.LoggerFactory;
setUnassignedTabletsIsSet(true);
this.serversShuttingDown = serversShuttingDown;
this.deadTabletServers = deadTabletServers;
+ this.bulkImports = bulkImports;
}
/**
@@ -277,6 +287,13 @@ import org.slf4j.LoggerFactory;
}
this.deadTabletServers = __this__deadTabletServers;
}
+ if (other.isSetBulkImports()) {
+ List<BulkImportStatus> __this__bulkImports = new ArrayList<BulkImportStatus>(other.bulkImports.size());
+ for (BulkImportStatus other_element : other.bulkImports) {
+ __this__bulkImports.add(new BulkImportStatus(other_element));
+ }
+ this.bulkImports = __this__bulkImports;
+ }
}
public MasterMonitorInfo deepCopy() {
@@ -294,6 +311,7 @@ import org.slf4j.LoggerFactory;
this.unassignedTablets = 0;
this.serversShuttingDown = null;
this.deadTabletServers = null;
+ this.bulkImports = null;
}
public int getTableMapSize() {
@@ -570,6 +588,45 @@ import org.slf4j.LoggerFactory;
}
}
+ public int getBulkImportsSize() {
+ return (this.bulkImports == null) ? 0 : this.bulkImports.size();
+ }
+
+ public java.util.Iterator<BulkImportStatus> getBulkImportsIterator() {
+ return (this.bulkImports == null) ? null : this.bulkImports.iterator();
+ }
+
+ public void addToBulkImports(BulkImportStatus elem) {
+ if (this.bulkImports == null) {
+ this.bulkImports = new ArrayList<BulkImportStatus>();
+ }
+ this.bulkImports.add(elem);
+ }
+
+ public List<BulkImportStatus> getBulkImports() {
+ return this.bulkImports;
+ }
+
+ public MasterMonitorInfo setBulkImports(List<BulkImportStatus> bulkImports) {
+ this.bulkImports = bulkImports;
+ return this;
+ }
+
+ public void unsetBulkImports() {
+ this.bulkImports = null;
+ }
+
+ /** Returns true if field bulkImports is set (has been assigned a value) and false otherwise */
+ public boolean isSetBulkImports() {
+ return this.bulkImports != null;
+ }
+
+ public void setBulkImportsIsSet(boolean value) {
+ if (!value) {
+ this.bulkImports = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_MAP:
@@ -636,6 +693,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case BULK_IMPORTS:
+ if (value == null) {
+ unsetBulkImports();
+ } else {
+ setBulkImports((List<BulkImportStatus>)value);
+ }
+ break;
+
}
}
@@ -665,6 +730,9 @@ import org.slf4j.LoggerFactory;
case DEAD_TABLET_SERVERS:
return getDeadTabletServers();
+ case BULK_IMPORTS:
+ return getBulkImports();
+
}
throw new IllegalStateException();
}
@@ -692,6 +760,8 @@ import org.slf4j.LoggerFactory;
return isSetServersShuttingDown();
case DEAD_TABLET_SERVERS:
return isSetDeadTabletServers();
+ case BULK_IMPORTS:
+ return isSetBulkImports();
}
throw new IllegalStateException();
}
@@ -781,6 +851,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_bulkImports = true && this.isSetBulkImports();
+ boolean that_present_bulkImports = true && that.isSetBulkImports();
+ if (this_present_bulkImports || that_present_bulkImports) {
+ if (!(this_present_bulkImports && that_present_bulkImports))
+ return false;
+ if (!this.bulkImports.equals(that.bulkImports))
+ return false;
+ }
+
return true;
}
@@ -877,6 +956,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBulkImports()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkImports, other.bulkImports);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -956,6 +1045,14 @@ import org.slf4j.LoggerFactory;
sb.append(this.deadTabletServers);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("bulkImports:");
+ if (this.bulkImports == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.bulkImports);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -1004,16 +1101,16 @@ import org.slf4j.LoggerFactory;
case 1: // TABLE_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map18 = iprot.readMapBegin();
- struct.tableMap = new HashMap<String,TableInfo>(2*_map18.size);
- for (int _i19 = 0; _i19 < _map18.size; ++_i19)
+ org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin();
+ struct.tableMap = new HashMap<String,TableInfo>(2*_map26.size);
+ for (int _i27 = 0; _i27 < _map26.size; ++_i27)
{
- String _key20;
- TableInfo _val21;
- _key20 = iprot.readString();
- _val21 = new TableInfo();
- _val21.read(iprot);
- struct.tableMap.put(_key20, _val21);
+ String _key28;
+ TableInfo _val29;
+ _key28 = iprot.readString();
+ _val29 = new TableInfo();
+ _val29.read(iprot);
+ struct.tableMap.put(_key28, _val29);
}
iprot.readMapEnd();
}
@@ -1025,14 +1122,14 @@ import org.slf4j.LoggerFactory;
case 2: // T_SERVER_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
- struct.tServerInfo = new ArrayList<TabletServerStatus>(_list22.size);
- for (int _i23 = 0; _i23 < _list22.size; ++_i23)
+ org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
+ struct.tServerInfo = new ArrayList<TabletServerStatus>(_list30.size);
+ for (int _i31 = 0; _i31 < _list30.size; ++_i31)
{
- TabletServerStatus _elem24;
- _elem24 = new TabletServerStatus();
- _elem24.read(iprot);
- struct.tServerInfo.add(_elem24);
+ TabletServerStatus _elem32;
+ _elem32 = new TabletServerStatus();
+ _elem32.read(iprot);
+ struct.tServerInfo.add(_elem32);
}
iprot.readListEnd();
}
@@ -1044,15 +1141,15 @@ import org.slf4j.LoggerFactory;
case 3: // BAD_TSERVERS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map25 = iprot.readMapBegin();
- struct.badTServers = new HashMap<String,Byte>(2*_map25.size);
- for (int _i26 = 0; _i26 < _map25.size; ++_i26)
+ org.apache.thrift.protocol.TMap _map33 = iprot.readMapBegin();
+ struct.badTServers = new HashMap<String,Byte>(2*_map33.size);
+ for (int _i34 = 0; _i34 < _map33.size; ++_i34)
{
- String _key27;
- byte _val28;
- _key27 = iprot.readString();
- _val28 = iprot.readByte();
- struct.badTServers.put(_key27, _val28);
+ String _key35;
+ byte _val36;
+ _key35 = iprot.readString();
+ _val36 = iprot.readByte();
+ struct.badTServers.put(_key35, _val36);
}
iprot.readMapEnd();
}
@@ -1088,13 +1185,13 @@ import org.slf4j.LoggerFactory;
case 9: // SERVERS_SHUTTING_DOWN
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set29 = iprot.readSetBegin();
- struct.serversShuttingDown = new HashSet<String>(2*_set29.size);
- for (int _i30 = 0; _i30 < _set29.size; ++_i30)
+ org.apache.thrift.protocol.TSet _set37 = iprot.readSetBegin();
+ struct.serversShuttingDown = new HashSet<String>(2*_set37.size);
+ for (int _i38 = 0; _i38 < _set37.size; ++_i38)
{
- String _elem31;
- _elem31 = iprot.readString();
- struct.serversShuttingDown.add(_elem31);
+ String _elem39;
+ _elem39 = iprot.readString();
+ struct.serversShuttingDown.add(_elem39);
}
iprot.readSetEnd();
}
@@ -1106,14 +1203,14 @@ import org.slf4j.LoggerFactory;
case 10: // DEAD_TABLET_SERVERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.deadTabletServers = new ArrayList<DeadServer>(_list32.size);
- for (int _i33 = 0; _i33 < _list32.size; ++_i33)
+ org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
+ struct.deadTabletServers = new ArrayList<DeadServer>(_list40.size);
+ for (int _i41 = 0; _i41 < _list40.size; ++_i41)
{
- DeadServer _elem34;
- _elem34 = new DeadServer();
- _elem34.read(iprot);
- struct.deadTabletServers.add(_elem34);
+ DeadServer _elem42;
+ _elem42 = new DeadServer();
+ _elem42.read(iprot);
+ struct.deadTabletServers.add(_elem42);
}
iprot.readListEnd();
}
@@ -1122,6 +1219,25 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 11: // BULK_IMPORTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list43 = iprot.readListBegin();
+ struct.bulkImports = new ArrayList<BulkImportStatus>(_list43.size);
+ for (int _i44 = 0; _i44 < _list43.size; ++_i44)
+ {
+ BulkImportStatus _elem45;
+ _elem45 = new BulkImportStatus();
+ _elem45.read(iprot);
+ struct.bulkImports.add(_elem45);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBulkImportsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1141,10 +1257,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size()));
- for (Map.Entry<String, TableInfo> _iter35 : struct.tableMap.entrySet())
+ for (Map.Entry<String, TableInfo> _iter46 : struct.tableMap.entrySet())
{
- oprot.writeString(_iter35.getKey());
- _iter35.getValue().write(oprot);
+ oprot.writeString(_iter46.getKey());
+ _iter46.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -1154,9 +1270,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(T_SERVER_INFO_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tServerInfo.size()));
- for (TabletServerStatus _iter36 : struct.tServerInfo)
+ for (TabletServerStatus _iter47 : struct.tServerInfo)
{
- _iter36.write(oprot);
+ _iter47.write(oprot);
}
oprot.writeListEnd();
}
@@ -1166,10 +1282,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(BAD_TSERVERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, struct.badTServers.size()));
- for (Map.Entry<String, Byte> _iter37 : struct.badTServers.entrySet())
+ for (Map.Entry<String, Byte> _iter48 : struct.badTServers.entrySet())
{
- oprot.writeString(_iter37.getKey());
- oprot.writeByte(_iter37.getValue());
+ oprot.writeString(_iter48.getKey());
+ oprot.writeByte(_iter48.getValue());
}
oprot.writeMapEnd();
}
@@ -1192,9 +1308,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SERVERS_SHUTTING_DOWN_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.serversShuttingDown.size()));
- for (String _iter38 : struct.serversShuttingDown)
+ for (String _iter49 : struct.serversShuttingDown)
{
- oprot.writeString(_iter38);
+ oprot.writeString(_iter49);
}
oprot.writeSetEnd();
}
@@ -1204,9 +1320,21 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(DEAD_TABLET_SERVERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deadTabletServers.size()));
- for (DeadServer _iter39 : struct.deadTabletServers)
+ for (DeadServer _iter50 : struct.deadTabletServers)
{
- _iter39.write(oprot);
+ _iter50.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.bulkImports != null) {
+ oprot.writeFieldBegin(BULK_IMPORTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.bulkImports.size()));
+ for (BulkImportStatus _iter51 : struct.bulkImports)
+ {
+ _iter51.write(oprot);
}
oprot.writeListEnd();
}
@@ -1254,33 +1382,36 @@ import org.slf4j.LoggerFactory;
if (struct.isSetDeadTabletServers()) {
optionals.set(7);
}
- oprot.writeBitSet(optionals, 8);
+ if (struct.isSetBulkImports()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
if (struct.isSetTableMap()) {
{
oprot.writeI32(struct.tableMap.size());
- for (Map.Entry<String, TableInfo> _iter40 : struct.tableMap.entrySet())
+ for (Map.Entry<String, TableInfo> _iter52 : struct.tableMap.entrySet())
{
- oprot.writeString(_iter40.getKey());
- _iter40.getValue().write(oprot);
+ oprot.writeString(_iter52.getKey());
+ _iter52.getValue().write(oprot);
}
}
}
if (struct.isSetTServerInfo()) {
{
oprot.writeI32(struct.tServerInfo.size());
- for (TabletServerStatus _iter41 : struct.tServerInfo)
+ for (TabletServerStatus _iter53 : struct.tServerInfo)
{
- _iter41.write(oprot);
+ _iter53.write(oprot);
}
}
}
if (struct.isSetBadTServers()) {
{
oprot.writeI32(struct.badTServers.size());
- for (Map.Entry<String, Byte> _iter42 : struct.badTServers.entrySet())
+ for (Map.Entry<String, Byte> _iter54 : struct.badTServers.entrySet())
{
- oprot.writeString(_iter42.getKey());
- oprot.writeByte(_iter42.getValue());
+ oprot.writeString(_iter54.getKey());
+ oprot.writeByte(_iter54.getValue());
}
}
}
@@ -1296,18 +1427,27 @@ import org.slf4j.LoggerFactory;
if (struct.isSetServersShuttingDown()) {
{
oprot.writeI32(struct.serversShuttingDown.size());
- for (String _iter43 : struct.serversShuttingDown)
+ for (String _iter55 : struct.serversShuttingDown)
{
- oprot.writeString(_iter43);
+ oprot.writeString(_iter55);
}
}
}
if (struct.isSetDeadTabletServers()) {
{
oprot.writeI32(struct.deadTabletServers.size());
- for (DeadServer _iter44 : struct.deadTabletServers)
+ for (DeadServer _iter56 : struct.deadTabletServers)
+ {
+ _iter56.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetBulkImports()) {
+ {
+ oprot.writeI32(struct.bulkImports.size());
+ for (BulkImportStatus _iter57 : struct.bulkImports)
{
- _iter44.write(oprot);
+ _iter57.write(oprot);
}
}
}
@@ -1316,48 +1456,48 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MasterMonitorInfo struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
+ BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map45 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tableMap = new HashMap<String,TableInfo>(2*_map45.size);
- for (int _i46 = 0; _i46 < _map45.size; ++_i46)
+ org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.tableMap = new HashMap<String,TableInfo>(2*_map58.size);
+ for (int _i59 = 0; _i59 < _map58.size; ++_i59)
{
- String _key47;
- TableInfo _val48;
- _key47 = iprot.readString();
- _val48 = new TableInfo();
- _val48.read(iprot);
- struct.tableMap.put(_key47, _val48);
+ String _key60;
+ TableInfo _val61;
+ _key60 = iprot.readString();
+ _val61 = new TableInfo();
+ _val61.read(iprot);
+ struct.tableMap.put(_key60, _val61);
}
}
struct.setTableMapIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tServerInfo = new ArrayList<TabletServerStatus>(_list49.size);
- for (int _i50 = 0; _i50 < _list49.size; ++_i50)
+ org.apache.thrift.protocol.TList _list62 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.tServerInfo = new ArrayList<TabletServerStatus>(_list62.size);
+ for (int _i63 = 0; _i63 < _list62.size; ++_i63)
{
- TabletServerStatus _elem51;
- _elem51 = new TabletServerStatus();
- _elem51.read(iprot);
- struct.tServerInfo.add(_elem51);
+ TabletServerStatus _elem64;
+ _elem64 = new TabletServerStatus();
+ _elem64.read(iprot);
+ struct.tServerInfo.add(_elem64);
}
}
struct.setTServerInfoIsSet(true);
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TMap _map52 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, iprot.readI32());
- struct.badTServers = new HashMap<String,Byte>(2*_map52.size);
- for (int _i53 = 0; _i53 < _map52.size; ++_i53)
+ org.apache.thrift.protocol.TMap _map65 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, iprot.readI32());
+ struct.badTServers = new HashMap<String,Byte>(2*_map65.size);
+ for (int _i66 = 0; _i66 < _map65.size; ++_i66)
{
- String _key54;
- byte _val55;
- _key54 = iprot.readString();
- _val55 = iprot.readByte();
- struct.badTServers.put(_key54, _val55);
+ String _key67;
+ byte _val68;
+ _key67 = iprot.readString();
+ _val68 = iprot.readByte();
+ struct.badTServers.put(_key67, _val68);
}
}
struct.setBadTServersIsSet(true);
@@ -1376,31 +1516,45 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(6)) {
{
- org.apache.thrift.protocol.TSet _set56 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.serversShuttingDown = new HashSet<String>(2*_set56.size);
- for (int _i57 = 0; _i57 < _set56.size; ++_i57)
+ org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.serversShuttingDown = new HashSet<String>(2*_set69.size);
+ for (int _i70 = 0; _i70 < _set69.size; ++_i70)
{
- String _elem58;
- _elem58 = iprot.readString();
- struct.serversShuttingDown.add(_elem58);
+ String _elem71;
+ _elem71 = iprot.readString();
+ struct.serversShuttingDown.add(_elem71);
}
}
struct.setServersShuttingDownIsSet(true);
}
if (incoming.get(7)) {
{
- org.apache.thrift.protocol.TList _list59 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.deadTabletServers = new ArrayList<DeadServer>(_list59.size);
- for (int _i60 = 0; _i60 < _list59.size; ++_i60)
+ org.apache.thrift.protocol.TList _list72 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.deadTabletServers = new ArrayList<DeadServer>(_list72.size);
+ for (int _i73 = 0; _i73 < _list72.size; ++_i73)
{
- DeadServer _elem61;
- _elem61 = new DeadServer();
- _elem61.read(iprot);
- struct.deadTabletServers.add(_elem61);
+ DeadServer _elem74;
+ _elem74 = new DeadServer();
+ _elem74.read(iprot);
+ struct.deadTabletServers.add(_elem74);
}
}
struct.setDeadTabletServersIsSet(true);
}
+ if (incoming.get(8)) {
+ {
+ org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.bulkImports = new ArrayList<BulkImportStatus>(_list75.size);
+ for (int _i76 = 0; _i76 < _list75.size; ++_i76)
+ {
+ BulkImportStatus _elem77;
+ _elem77 = new BulkImportStatus();
+ _elem77.read(iprot);
+ struct.bulkImports.add(_elem77);
+ }
+ }
+ struct.setBulkImportsIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
index 1967a70..0c7416f 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
@@ -64,6 +64,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField LOG_SORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("logSorts", org.apache.thrift.protocol.TType.LIST, (short)14);
private static final org.apache.thrift.protocol.TField FLUSHS_FIELD_DESC = new org.apache.thrift.protocol.TField("flushs", org.apache.thrift.protocol.TType.I64, (short)15);
private static final org.apache.thrift.protocol.TField SYNCS_FIELD_DESC = new org.apache.thrift.protocol.TField("syncs", org.apache.thrift.protocol.TType.I64, (short)16);
+ private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)17);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -84,6 +85,7 @@ import org.slf4j.LoggerFactory;
public List<RecoveryStatus> logSorts; // required
public long flushs; // required
public long syncs; // required
+ public List<BulkImportStatus> bulkImports; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -99,7 +101,8 @@ import org.slf4j.LoggerFactory;
DATA_CACHE_REQUEST((short)13, "dataCacheRequest"),
LOG_SORTS((short)14, "logSorts"),
FLUSHS((short)15, "flushs"),
- SYNCS((short)16, "syncs");
+ SYNCS((short)16, "syncs"),
+ BULK_IMPORTS((short)17, "bulkImports");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -140,6 +143,8 @@ import org.slf4j.LoggerFactory;
return FLUSHS;
case 16: // SYNCS
return SYNCS;
+ case 17: // BULK_IMPORTS
+ return BULK_IMPORTS;
default:
return null;
}
@@ -223,6 +228,9 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SYNCS, new org.apache.thrift.meta_data.FieldMetaData("syncs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkImportStatus.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletServerStatus.class, metaDataMap);
}
@@ -243,7 +251,8 @@ import org.slf4j.LoggerFactory;
long dataCacheRequest,
List<RecoveryStatus> logSorts,
long flushs,
- long syncs)
+ long syncs,
+ List<BulkImportStatus> bulkImports)
{
this();
this.tableMap = tableMap;
@@ -269,6 +278,7 @@ import org.slf4j.LoggerFactory;
setFlushsIsSet(true);
this.syncs = syncs;
setSyncsIsSet(true);
+ this.bulkImports = bulkImports;
}
/**
@@ -311,6 +321,13 @@ import org.slf4j.LoggerFactory;
}
this.flushs = other.flushs;
this.syncs = other.syncs;
+ if (other.isSetBulkImports()) {
+ List<BulkImportStatus> __this__bulkImports = new ArrayList<BulkImportStatus>(other.bulkImports.size());
+ for (BulkImportStatus other_element : other.bulkImports) {
+ __this__bulkImports.add(new BulkImportStatus(other_element));
+ }
+ this.bulkImports = __this__bulkImports;
+ }
}
public TabletServerStatus deepCopy() {
@@ -342,6 +359,7 @@ import org.slf4j.LoggerFactory;
this.flushs = 0;
setSyncsIsSet(false);
this.syncs = 0;
+ this.bulkImports = null;
}
public int getTableMapSize() {
@@ -672,6 +690,45 @@ import org.slf4j.LoggerFactory;
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SYNCS_ISSET_ID, value);
}
+ public int getBulkImportsSize() {
+ return (this.bulkImports == null) ? 0 : this.bulkImports.size();
+ }
+
+ public java.util.Iterator<BulkImportStatus> getBulkImportsIterator() {
+ return (this.bulkImports == null) ? null : this.bulkImports.iterator();
+ }
+
+ public void addToBulkImports(BulkImportStatus elem) {
+ if (this.bulkImports == null) {
+ this.bulkImports = new ArrayList<BulkImportStatus>();
+ }
+ this.bulkImports.add(elem);
+ }
+
+ public List<BulkImportStatus> getBulkImports() {
+ return this.bulkImports;
+ }
+
+ public TabletServerStatus setBulkImports(List<BulkImportStatus> bulkImports) {
+ this.bulkImports = bulkImports;
+ return this;
+ }
+
+ public void unsetBulkImports() {
+ this.bulkImports = null;
+ }
+
+ /** Returns true if field bulkImports is set (has been assigned a value) and false otherwise */
+ public boolean isSetBulkImports() {
+ return this.bulkImports != null;
+ }
+
+ public void setBulkImportsIsSet(boolean value) {
+ if (!value) {
+ this.bulkImports = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_MAP:
@@ -778,6 +835,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case BULK_IMPORTS:
+ if (value == null) {
+ unsetBulkImports();
+ } else {
+ setBulkImports((List<BulkImportStatus>)value);
+ }
+ break;
+
}
}
@@ -822,6 +887,9 @@ import org.slf4j.LoggerFactory;
case SYNCS:
return Long.valueOf(getSyncs());
+ case BULK_IMPORTS:
+ return getBulkImports();
+
}
throw new IllegalStateException();
}
@@ -859,6 +927,8 @@ import org.slf4j.LoggerFactory;
return isSetFlushs();
case SYNCS:
return isSetSyncs();
+ case BULK_IMPORTS:
+ return isSetBulkImports();
}
throw new IllegalStateException();
}
@@ -993,6 +1063,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_bulkImports = true && this.isSetBulkImports();
+ boolean that_present_bulkImports = true && that.isSetBulkImports();
+ if (this_present_bulkImports || that_present_bulkImports) {
+ if (!(this_present_bulkImports && that_present_bulkImports))
+ return false;
+ if (!this.bulkImports.equals(that.bulkImports))
+ return false;
+ }
+
return true;
}
@@ -1139,6 +1218,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBulkImports()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkImports, other.bulkImports);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1222,6 +1311,14 @@ import org.slf4j.LoggerFactory;
sb.append("syncs:");
sb.append(this.syncs);
first = false;
+ if (!first) sb.append(", ");
+ sb.append("bulkImports:");
+ if (this.bulkImports == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.bulkImports);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -1395,6 +1492,25 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 17: // BULK_IMPORTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list7 = iprot.readListBegin();
+ struct.bulkImports = new ArrayList<BulkImportStatus>(_list7.size);
+ for (int _i8 = 0; _i8 < _list7.size; ++_i8)
+ {
+ BulkImportStatus _elem9;
+ _elem9 = new BulkImportStatus();
+ _elem9.read(iprot);
+ struct.bulkImports.add(_elem9);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBulkImportsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1414,10 +1530,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size()));
- for (Map.Entry<String, TableInfo> _iter7 : struct.tableMap.entrySet())
+ for (Map.Entry<String, TableInfo> _iter10 : struct.tableMap.entrySet())
{
- oprot.writeString(_iter7.getKey());
- _iter7.getValue().write(oprot);
+ oprot.writeString(_iter10.getKey());
+ _iter10.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -1456,9 +1572,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(LOG_SORTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.logSorts.size()));
- for (RecoveryStatus _iter8 : struct.logSorts)
+ for (RecoveryStatus _iter11 : struct.logSorts)
{
- _iter8.write(oprot);
+ _iter11.write(oprot);
}
oprot.writeListEnd();
}
@@ -1470,6 +1586,18 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SYNCS_FIELD_DESC);
oprot.writeI64(struct.syncs);
oprot.writeFieldEnd();
+ if (struct.bulkImports != null) {
+ oprot.writeFieldBegin(BULK_IMPORTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.bulkImports.size()));
+ for (BulkImportStatus _iter12 : struct.bulkImports)
+ {
+ _iter12.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1527,14 +1655,17 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSyncs()) {
optionals.set(12);
}
- oprot.writeBitSet(optionals, 13);
+ if (struct.isSetBulkImports()) {
+ optionals.set(13);
+ }
+ oprot.writeBitSet(optionals, 14);
if (struct.isSetTableMap()) {
{
oprot.writeI32(struct.tableMap.size());
- for (Map.Entry<String, TableInfo> _iter9 : struct.tableMap.entrySet())
+ for (Map.Entry<String, TableInfo> _iter13 : struct.tableMap.entrySet())
{
- oprot.writeString(_iter9.getKey());
- _iter9.getValue().write(oprot);
+ oprot.writeString(_iter13.getKey());
+ _iter13.getValue().write(oprot);
}
}
}
@@ -1568,9 +1699,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetLogSorts()) {
{
oprot.writeI32(struct.logSorts.size());
- for (RecoveryStatus _iter10 : struct.logSorts)
+ for (RecoveryStatus _iter14 : struct.logSorts)
{
- _iter10.write(oprot);
+ _iter14.write(oprot);
}
}
}
@@ -1580,24 +1711,33 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSyncs()) {
oprot.writeI64(struct.syncs);
}
+ if (struct.isSetBulkImports()) {
+ {
+ oprot.writeI32(struct.bulkImports.size());
+ for (BulkImportStatus _iter15 : struct.bulkImports)
+ {
+ _iter15.write(oprot);
+ }
+ }
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletServerStatus struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(13);
+ BitSet incoming = iprot.readBitSet(14);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map11 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tableMap = new HashMap<String,TableInfo>(2*_map11.size);
- for (int _i12 = 0; _i12 < _map11.size; ++_i12)
+ org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.tableMap = new HashMap<String,TableInfo>(2*_map16.size);
+ for (int _i17 = 0; _i17 < _map16.size; ++_i17)
{
- String _key13;
- TableInfo _val14;
- _key13 = iprot.readString();
- _val14 = new TableInfo();
- _val14.read(iprot);
- struct.tableMap.put(_key13, _val14);
+ String _key18;
+ TableInfo _val19;
+ _key18 = iprot.readString();
+ _val19 = new TableInfo();
+ _val19.read(iprot);
+ struct.tableMap.put(_key18, _val19);
}
}
struct.setTableMapIsSet(true);
@@ -1640,14 +1780,14 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(10)) {
{
- org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.logSorts = new ArrayList<RecoveryStatus>(_list15.size);
- for (int _i16 = 0; _i16 < _list15.size; ++_i16)
+ org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.logSorts = new ArrayList<RecoveryStatus>(_list20.size);
+ for (int _i21 = 0; _i21 < _list20.size; ++_i21)
{
- RecoveryStatus _elem17;
- _elem17 = new RecoveryStatus();
- _elem17.read(iprot);
- struct.logSorts.add(_elem17);
+ RecoveryStatus _elem22;
+ _elem22 = new RecoveryStatus();
+ _elem22.read(iprot);
+ struct.logSorts.add(_elem22);
}
}
struct.setLogSortsIsSet(true);
@@ -1660,6 +1800,20 @@ import org.slf4j.LoggerFactory;
struct.syncs = iprot.readI64();
struct.setSyncsIsSet(true);
}
+ if (incoming.get(13)) {
+ {
+ org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.bulkImports = new ArrayList<BulkImportStatus>(_list23.size);
+ for (int _i24 = 0; _i24 < _list23.size; ++_i24)
+ {
+ BulkImportStatus _elem25;
+ _elem25 = new BulkImportStatus();
+ _elem25.read(iprot);
+ struct.bulkImports.add(_elem25);
+ }
+ }
+ struct.setBulkImportsIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
index bd529b9..6c26129 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
@@ -446,14 +446,14 @@ import org.slf4j.LoggerFactory;
case 2: // NEW_TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list62.size);
- for (int _i63 = 0; _i63 < _list62.size; ++_i63)
+ org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
+ struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list78.size);
+ for (int _i79 = 0; _i79 < _list78.size; ++_i79)
{
- org.apache.accumulo.core.data.thrift.TKeyExtent _elem64;
- _elem64 = new org.apache.accumulo.core.data.thrift.TKeyExtent();
- _elem64.read(iprot);
- struct.newTablets.add(_elem64);
+ org.apache.accumulo.core.data.thrift.TKeyExtent _elem80;
+ _elem80 = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ _elem80.read(iprot);
+ struct.newTablets.add(_elem80);
}
iprot.readListEnd();
}
@@ -486,9 +486,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(NEW_TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.newTablets.size()));
- for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter65 : struct.newTablets)
+ for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter81 : struct.newTablets)
{
- _iter65.write(oprot);
+ _iter81.write(oprot);
}
oprot.writeListEnd();
}
@@ -525,9 +525,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetNewTablets()) {
{
oprot.writeI32(struct.newTablets.size());
- for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter66 : struct.newTablets)
+ for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter82 : struct.newTablets)
{
- _iter66.write(oprot);
+ _iter82.write(oprot);
}
}
}
@@ -544,14 +544,14 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list67.size);
- for (int _i68 = 0; _i68 < _list67.size; ++_i68)
+ org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list83.size);
+ for (int _i84 = 0; _i84 < _list83.size; ++_i84)
{
- org.apache.accumulo.core.data.thrift.TKeyExtent _elem69;
- _elem69 = new org.apache.accumulo.core.data.thrift.TKeyExtent();
- _elem69.read(iprot);
- struct.newTablets.add(_elem69);
+ org.apache.accumulo.core.data.thrift.TKeyExtent _elem85;
+ _elem85 = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ _elem85.read(iprot);
+ struct.newTablets.add(_elem85);
}
}
struct.setNewTabletsIsSet(true);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/thrift/master.thrift
----------------------------------------------------------------------
diff --git a/core/src/main/thrift/master.thrift b/core/src/main/thrift/master.thrift
index f7a1dc9..6104fea 100644
--- a/core/src/main/thrift/master.thrift
+++ b/core/src/main/thrift/master.thrift
@@ -48,6 +48,28 @@ struct RecoveryStatus {
6:double progress
}
+enum BulkImportState {
+ INITIAL
+ # master moves the files into the accumulo area
+ MOVING
+ # slave tserver examines the index of the file
+ PROCESSING
+ # slave tserver assigns the file to tablets
+ ASSIGNING
+ # tserver incorporates file into tablet
+ LOADING
+ # master moves error files into the error directory
+ COPY_FILES
+ # flags and locks removed
+ CLEANUP
+}
+
+struct BulkImportStatus {
+ 1:i64 startTime
+ 2:string filename
+ 3:BulkImportState state
+}
+
struct TabletServerStatus {
1:map<string, TableInfo> tableMap
2:i64 lastContact
@@ -62,6 +84,7 @@ struct TabletServerStatus {
14:list<RecoveryStatus> logSorts
15:i64 flushs
16:i64 syncs
+ 17:list<BulkImportStatus> bulkImports
}
enum MasterState {
@@ -95,6 +118,7 @@ struct MasterMonitorInfo {
7:i32 unassignedTablets
9:set<string> serversShuttingDown
10:list<DeadServer> deadTabletServers
+ 11:list<BulkImportStatus> bulkImports
}
struct TabletSplit {