public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); } { int dataSize = 0; for (int i = 0; i < functionSignature_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(functionSignature_.getByteString(i)); } size += dataSize; size += 1 * getFunctionSignatureList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); } { int dataSize = 0; for (int i = 0; i < functionSignature_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(functionSignature_.getByteString(i)); } size += dataSize; size += 1 * getFunctionSignatureList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
/** * Validates jar and its functions against remote jars. * First checks if there is no duplicate by jar name and then looks for duplicates among functions. * * @param remoteJars list of remote jars to validate against * @param jarName jar name to be validated * @param functions list of functions present in jar to be validated * @throws JarValidationException in case of jar with the same name was found * @throws FunctionValidationException in case duplicated function was found */ private void validateAgainstRemoteRegistry(List<Jar> remoteJars, String jarName, List<String> functions) { for (Jar remoteJar : remoteJars) { if (remoteJar.getName().equals(jarName)) { throw new JarValidationException(String.format("Jar with %s name has been already registered", jarName)); } for (String remoteFunction : remoteJar.getFunctionSignatureList()) { for (String func : functions) { if (remoteFunction.equals(func)) { throw new FunctionValidationException( String.format("Found duplicated function in %s: %s", remoteJar.getName(), remoteFunction)); } } } } }
String.format("The following UDFs in jar %s have been unregistered:\n%s", jarName, deletedJar.getFunctionSignatureList()));
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.Jar message) throws java.io.IOException { if(message.hasName()) output.writeString(1, message.getName(), false); for(String functionSignature : message.getFunctionSignatureList()) output.writeString(2, functionSignature, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.Jar message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.Jar message) throws java.io.IOException { if(message.hasName()) output.writeString(1, message.getName(), false); for(String functionSignature : message.getFunctionSignatureList()) output.writeString(2, functionSignature, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.Jar message)