properties_ = com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance(); } else { propertiesBuilder_.clear();
String password = ""; final UserProperties props = inbound.getProperties(); for (int i = 0; i < props.getPropertiesCount(); i++) { Property prop = props.getProperties(i); if (UserSession.PASSWORD.equalsIgnoreCase(prop.getKey())) { password = prop.getValue();
private UserBitShared.UserCredentials getUserCredentials() { // If username is not propagated as one of the properties String userName = "anonymous"; if (props != null) { for (Property property: props.getPropertiesList()) { if (property.getKey().equalsIgnoreCase("user") && !Strings.isNullOrEmpty(property.getValue())) { userName = property.getValue(); break; } } } return UserBitShared.UserCredentials.newBuilder().setUserName(userName).build(); }
); if(!inbound.hasProperties() || inbound.getProperties().getPropertiesCount() == 0){ infoMsg += "\tUser Properties: none"; } else { infoMsg += "\tUser Properties: \n"; UserProperties props = inbound.getProperties(); for (int i = 0; i < props.getPropertiesCount(); i++) { Property p = props.getProperties(i); final String key = p.getKey().toLowerCase(); if (key.contains("password") || key.contains("pwd")) {
.setUserName("foo") .build()) .withUserProperties(UserProperties.getDefaultInstance()) .withOptionManager(nodeContext1.getOptionManager()) .build();
final UserProperties.Builder upBuilder = UserProperties.newBuilder(); for (final String key : props.stringPropertyNames()) { if (CLIENT_ONLY_PROPERTIES.contains(key.toLowerCase(Locale.ROOT))) {
.withUserProperties(UserProperties.getDefaultInstance()) .withOptionManager(nodeContext1.getOptionManager()) .build();
builder.setProperties(input.mergeObject(com.dremio.exec.proto.UserProtos.UserProperties.newBuilder(), com.dremio.exec.proto.SchemaUserProtos.UserProperties.MERGE));
.setUserName(username) .build()) .withUserProperties(UserProtos.UserProperties.getDefaultInstance()) .withOptionManager(sabotContext.getOptionManager()) .withDefaultSchema(context)
public Builder mergeFrom(com.dremio.exec.proto.UserProtos.UserProperties other) { if (other == com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance()) return this; if (propertiesBuilder_ == null) { if (!other.properties_.isEmpty()) { this.mergeUnknownFields(other.getUnknownFields()); return this;
/** * <code>optional .exec.user.UserProperties properties = 5;</code> */ public Builder mergeProperties(com.dremio.exec.proto.UserProtos.UserProperties value) { if (propertiesBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && properties_ != com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance()) { properties_ = com.dremio.exec.proto.UserProtos.UserProperties.newBuilder(properties_).mergeFrom(value).buildPartial(); } else { properties_ = value; } onChanged(); } else { propertiesBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /**
public Builder withUserProperties(UserProperties properties) { if (properties == null) { return this; } for (int i = 0; i < properties.getPropertiesCount(); i++) { final Property property = properties.getProperties(i); final String propertyName = property.getKey().toUpperCase(Locale.ROOT); final String propertyValue = property.getValue(); try { final PropertySetter sessionProperty = PropertySetter.valueOf(propertyName); sessionProperty.setValue(userSession, propertyValue); } catch(IllegalArgumentException e) { logger.warn("Ignoring unknown property: {}", propertyName); } } return this; }
public Builder toBuilder() { return newBuilder(this); }
public com.dremio.exec.proto.UserProtos.UserProperties buildPartial() { com.dremio.exec.proto.UserProtos.UserProperties result = new com.dremio.exec.proto.UserProtos.UserProperties(this); int from_bitField0_ = bitField0_; if (propertiesBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000001); } result.properties_ = properties_; } else { result.properties_ = propertiesBuilder_.build(); } onBuilt(); return result; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.dremio.exec.proto.UserProtos.UserProperties prototype) {
/** * <code>optional .exec.user.UserProperties properties = 5;</code> */ public Builder clearProperties() { if (propertiesBuilder_ == null) { properties_ = com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance(); onChanged(); } else { propertiesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /**
public com.dremio.exec.proto.UserProtos.UserProperties getDefaultInstanceForType() { return com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance(); }
private void initFields() { channel_ = com.dremio.exec.proto.UserBitShared.RpcChannel.USER; supportListening_ = false; rpcVersion_ = 0; credentials_ = com.dremio.exec.proto.UserBitShared.UserCredentials.getDefaultInstance(); properties_ = com.dremio.exec.proto.UserProtos.UserProperties.getDefaultInstance(); supportComplexTypes_ = false; supportTimeout_ = false; clientInfos_ = com.dremio.exec.proto.UserBitShared.RpcEndpointInfos.getDefaultInstance(); recordBatchType_ = com.dremio.exec.proto.UserProtos.RecordBatchType.DRILL; supportedRecordBatchFormats_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1;
private static UserSession session() { return UserSession.Builder.newBuilder() .withUserProperties(UserProtos.UserProperties.getDefaultInstance()) .withCredentials(UserBitShared.UserCredentials.newBuilder().setUserName("foo").build()) .withOptionManager(getSabotContext().getOptionManager()) .setSupportComplexTypes(true) .build(); } }
private static UserSession session() { return UserSession.Builder.newBuilder() .withUserProperties(UserProtos.UserProperties.getDefaultInstance()) .withCredentials(UserBitShared.UserCredentials.newBuilder().setUserName("foo").build()) .withOptionManager(getSabotContext().getOptionManager()) .setSupportComplexTypes(true) .build(); }