本文整理汇总了Java中org.apache.thrift.protocol.TProtocolException类的典型用法代码示例。如果您正苦于以下问题:Java TProtocolException类的具体用法?Java TProtocolException怎么用?Java TProtocolException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TProtocolException类属于org.apache.thrift.protocol包,在下文中一共展示了TProtocolException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (storeName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
}
if (key == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (version != null) {
version.validate();
}
}
示例2: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (store == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'store' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (store != null) {
store.validate();
}
}
示例3: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (node == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'node' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (node != null) {
node.validate();
}
}
示例4: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (storeName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
}
if (key == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (versionedValue != null) {
versionedValue.validate();
}
}
示例5: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (storeName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
}
if (key == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
}
示例6: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (status == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
}
if (serverProtocolVersion == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (status != null) {
status.validate();
}
if (sessionHandle != null) {
sessionHandle.validate();
}
}
示例7: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (row == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
}
if (family == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString());
}
if (qualifier == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString());
}
if (tput == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tput != null) {
tput.validate();
}
}
示例8: tupleSchemeReadValue
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
@Override
protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
case PUT:
TPut put;
put = new TPut();
put.read(iprot);
return put;
case DELETE_SINGLE:
TDelete deleteSingle;
deleteSingle = new TDelete();
deleteSingle.read(iprot);
return deleteSingle;
default:
throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
throw new TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
示例9: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (error != null) {
error.validate();
}
}
示例10: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (header != null) {
header.validate();
}
}
示例11: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (key == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
}
if (versions == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'versions' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
示例12: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (version == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (version != null) {
version.validate();
}
}
示例13: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (key == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
}
if (values == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
示例14: validate
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (storeName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
示例15: read
import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_args 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: // SCANNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.scannerId = iprot.readI32();
struct.setScannerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NUM_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numRows = iprot.readI32();
struct.setNumRowsIsSet(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
if (!struct.isSetScannerId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}