Set the database partition for the URI (iff partition key is non-null).
778939
public DatabaseURIHelper partition(String partitionKey) {
        if (partitionKey != null) {
            this.path("_partition").path(partitionKey);
        }
        return returnThis();
    }
63591
public void setPartitionKeys(List<FieldSchema> partitionKeys) {
    this.setProp(HIVE_PARTITION_KEYS, GSON.toJson(partitionKeys, FIELD_SCHEMA_TYPE));
  }
422093
public static <E> PartitionKey partitionKeyForEntity(PartitionStrategy strategy,
      E entity, EntityAccessor<E> accessor) {
    return partitionKeyForEntity(strategy, entity, accessor, null);
  }
743506
def add_partition(self, partition):
        """"""
        assert(partition not in self._partitions)
        # Add partition to existing set
        self._partitions.add(partition)
        # Add broker to replica list
        partition.add_replica(self)
946940
View<E> viewForUri(URI location) {
    Preconditions.checkNotNull(location, "Partition location cannot be null");
    PartitionView<E> view = getPartitionView(location);
    if (view == unbounded) {
      return this;
    }
    return view;
  }
1369075
@TimerJ
    public TableMetadataBuilder withPartitionKey(String... fields) {
        for (String field : fields) {
            partitionKey.add(new ColumnName(tableName, field));

        }

        return this;
    }
910951
public DfuServiceInitiator setZip(@Nullable final Uri uri, @Nullable final String path) {
		return init(uri, path, 0, DfuBaseService.TYPE_AUTO, DfuBaseService.MIME_TYPE_ZIP);
	}
180728
def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context):
    
    self.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context)
    self.recv_alter_partitions_with_environment_context()
896503
def _set_cache_(self, attr):
        """"""
        if attr == "size":
            oinfo = self.repo.odb.info(self.binsha)
            self.size = oinfo.size
            # assert oinfo.type == self.type, _assertion_msg_format % (self.binsha, oinfo.type, self.type)
        else:
            super(Object, self)._set_cache_(attr)
1156718
def RegisterPartitionResolver(self, database_link, partition_resolver):
        
        if not database_link:
            raise ValueError("database_link is None or empty.")

        if partition_resolver is None:
            raise ValueError("partition_resolver is None.")

        self.partition_resolvers = {base.TrimBeginningAndEndingSlashes(database_link): partition_resolver}
351441
def GetPartitionResolver(self, database_link):
        
        if not database_link:
            raise ValueError("database_link is None or empty.")

        return self.partition_resolvers.get(base.TrimBeginningAndEndingSlashes(database_link))
584977
def init_db(self):
    '''
    '''
    self.session = None

    if not os.path.exists(self.data_base):
        mkdir_p(self.data_base)

    self.database = "%s/%s" %(self.data_base, self.study_id)
    if not os.path.exists(self.database):
        mkdir_p(self.database)
1104424
private void updateLocalKeyLoadStatus(Throwable t) {
        Operation op = new KeyLoadStatusOperation(mapName, t);
        // This updates the local record store on the partition thread.
        // If invoked by the SENDER_BACKUP however it's the replica index has to be set to 1, otherwise
        // it will be a remote call to the SENDER who is the owner of the given partitionId.
        if (hasBackup && role.is(Role.SENDER_BACKUP)) {
            opService.createInvocationBuilder(SERVICE_NAME, op, partitionId).setReplicaIndex(1).invoke();
        } else {
            opService.createInvocationBuilder(SERVICE_NAME, op, partitionId).invoke();
        }
    }
462268
@RuleSetup
    public void addPartition(String partitionId, String suffix) {

        this.partitions.put(partitionId, suffix);
    }
98459
public Partition withParameters(java.util.Map<String, String> parameters) {
        setParameters(parameters);
        return this;
    }
1324678
public void addPartition(RedisClusterNode partition) {

        LettuceAssert.notNull(partition, "Partition must not be null");

        synchronized (partitions) {
            slotCache = EMPTY;
            partitions.add(partition);
        }
    }
976136
public void setUri(String uri) {
                if (GitTaskUtils.isNullOrBlankString(uri)) {
                        throw new BuildException("Can't set null URI attribute.");
                }

                if (this.uri == null) {
                        try {
                                new URIish(uri);
                                this.uri = uri;
                        } catch (URISyntaxException e) {
                                throw new BuildException(String.format("Invalid URI '%s'.", uri), e);
                        }
                }
        }