Builds the index name.

@param bucketName
the bucket name
@return the string
978448
private String buildIndexName(String bucketName)
    {
        if (bucketName == null)
        {
            throw new KunderaException("Bucket Name can't be null!");
        }
        return (bucketName + CouchbaseConstants.INDEX_SUFFIX).toLowerCase();
    }
188003
public function buildIndex($bucketName, $indexNames)
    {
        $this->beginProfile($token = "    > build index $bucketName ...");

        $result = $this->db->buildIndex($bucketName, $indexNames);

        $this->endProfile($token);

        return $result;
    }
460761
public Bucket createBucketWithStorageClassAndLocation(String bucketName) {
    // [START createBucketWithStorageClassAndLocation]
    Bucket bucket =
        storage.create(
            BucketInfo.newBuilder(bucketName)
                // See here for possible values: http://g.co/cloud/storage/docs/storage-classes
                .setStorageClass(StorageClass.COLDLINE)
                // Possible values: http://g.co/cloud/storage/docs/bucket-locations#location-mr
                .setLocation("asia")
                .build());
    // [END createBucketWithStorageClassAndLocation]
    return bucket;
  }
387813
private Bucket getBucket(String bucketName)
      throws IOException {
    logger.atFine().log("getBucket(%s)", bucketName);
    checkArgument(!Strings.isNullOrEmpty(bucketName), "bucketName must not be null or empty");
    Storage.Buckets.Get getBucket = configureRequest(gcs.buckets().get(bucketName), bucketName);
    try {
      return getBucket.execute();
    } catch (IOException e) {
      if (errorExtractor.itemNotFound(e)) {
        logger.atFine().withCause(e).log("getBucket(%s): not found", bucketName);
        return null;
      }
      throw new IOException("Error accessing Bucket " + bucketName, e);
    }
  }
434366
public Page<Bucket> listBucketsWithSizeAndPrefix(String prefix) {
    // [START listBucketsWithSizeAndPrefix]
    // Include a prefix of bucket-name to reduce search space.
    // For more information read https://cloud.google.com/storage/docs/json_api/v1/buckets/list
    Page<Bucket> buckets =
        storage.list(BucketListOption.pageSize(100), BucketListOption.prefix(prefix));
    for (Bucket bucket : buckets.iterateAll()) {
      // do something with the bucket
    }
    // [END listBucketsWithSizeAndPrefix]
    return buckets;
  }
295589
public static String extName(String fileName) {
		if (fileName == null) {
			return null;
		}
		int index = fileName.lastIndexOf(StrUtil.DOT);
		if (index == -1) {
			return StrUtil.EMPTY;
		} else {
			String ext = fileName.substring(index + 1);
			// 扩展名中不能包含路径相关的符号
			return StrUtil.containsAny(ext, UNIX_SEPARATOR, WINDOWS_SEPARATOR) ? StrUtil.EMPTY : ext;
		}
	}
420678
public function dropIndex($bucketName, $indexName)
    {
        $bucketName = $this->db->quoteBucketName($bucketName);
        $indexName  = $this->db->quoteColumnName($indexName);

        return "DROP INDEX $bucketName.$indexName";
    }
179737
public Blob updateBlob(String bucketName, String blobName) {
    // [START updateBlob]
    Map<String, String> newMetadata = new HashMap<>();
    newMetadata.put("key", "value");
    storage.update(BlobInfo.newBuilder(bucketName, blobName).setMetadata(null).build());
    Blob blob =
        storage.update(BlobInfo.newBuilder(bucketName, blobName).setMetadata(newMetadata).build());
    // [END updateBlob]
    return blob;
  }
956108
public Acl createBucketAcl(String bucketName) {
    // [START createBucketAcl]
    Acl acl = storage.createAcl(bucketName, Acl.of(User.ofAllAuthenticatedUsers(), Role.READER));
    // [END createBucketAcl]
    return acl;
  }
59661
private void checkBucketName(String name) throws InvalidBucketNameException {
    if (name == null) {
      throw new InvalidBucketNameException(NULL_STRING, "null bucket name");
    }

    // Bucket names cannot be no less than 3 and no more than 63 characters long.
    if (name.length() < 3 || name.length() > 63) {
      String msg = "bucket name must be at least 3 and no more than 63 characters long";
      throw new InvalidBucketNameException(name, msg);
    }
    // Successive periods in bucket names are not allowed.
    if (name.matches("\\.\\.")) {
      String msg = "bucket name cannot contain successive periods. For more information refer "
          + "http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html";
      throw new InvalidBucketNameException(name, msg);
    }
    // Bucket names should be dns compatible.
    if (!name.matches("^[a-z0-9][a-z0-9\\.\\-]+[a-z0-9]$")) {
      String msg = "bucket name does not follow Amazon S3 standards. For more information refer "
          + "http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html";
      throw new InvalidBucketNameException(name, msg);
    }
  }
920109
Index getIndex(String indexName) {

        Index[] indexes = indexList;
        int     i       = getIndexIndex(indexName);

        return i == -1 ? null
                       : indexes[i];
    }
1366697
public String buildFilename(final ProblemInput input, final int attempt) {
		final StringBuilder builder = new StringBuilder();
		final Problem problem = input.getProblem();
		final ContestInfo info = problem.getParent();
		final int index = info.getProblems().indexOf(problem);
		final char letter = (char) ((int) 'A' + index);
		builder.append(letter)
			.append(FILENAME_SEPARATOR)
			.append(input.getName())
			.append(FILENAME_SEPARATOR);
		if (attempt == -1) {
			builder.append(PRACTICE);
		}
		else {
			builder.append(attempt);
		}
		builder.append(INPUT_EXTENSION);
		return builder.toString();
	}
371374
private void addBucket(String name)
    {
        String qouta = csmd.getBucketProperty("bucket.quota");
        int bucketQuota = qouta != null ? Integer.parseInt(qouta) : DEFAULT_RAM_SIZE_IN_MB;
        BucketSettings bucketSettings = new DefaultBucketSettings.Builder().type(BucketType.COUCHBASE).name(name)
                .quota(bucketQuota).build();

        try
        {
            clusterManager.insertBucket(bucketSettings);
            LOGGER.info("Bucket [" + name + "] is added!");
        }
        catch (CouchbaseException ex)
        {
            LOGGER.error("Not able to add bucket [" + name + "].", ex);
            throw new KunderaException("Not able to add bucket [" + name + "].", ex);
        }
    }
124702
@Override
    public void appendNames(StringBuilder sb, String sep)
    {
        // Let's first get the alphabetized list of all names from main hash
        TreeSet<PrefixedName> ts = new TreeSet<PrefixedName>();
        for (int i = 0; i < mNames.length; ++i) {
            PrefixedName name = mNames[i];
            if (name != null) {
                ts.add(name);
            }
        }

        // then spill area
        if (mBuckets != null) {
            for (int i = 0; i < (mNames.length >> 2); ++i) {
                Bucket b = mBuckets[i];
                while (b != null) {
                    ts.add(b.getName());
                    b = b.getNext();
                }
            }
        }

        // And then append them:
        Iterator<PrefixedName> it = ts.iterator();
        boolean first = true;
        while (it.hasNext()) {
            if (first) {
                first = false;
            } else {
                sb.append(sep);
            }
            sb.append(it.next().toString());
        }
    }
458978
public T setAppName(String appName) {
    checkNotNull(appName, "appName");
    builder.appName = appName;
    return self();
  }
901666
public Acl updateDefaultBucketAcl(String bucketName) {
    // [START updateDefaultBucketAcl]
    Acl acl =
        storage.updateDefaultAcl(bucketName, Acl.of(User.ofAllAuthenticatedUsers(), Role.OWNER));
    // [END updateDefaultBucketAcl]
    return acl;
  }
389998
public List<String> getIndexNames() {

        List<String> indexNames = new ArrayList<String>();
        for (int i = 0, n = m_indexes.size(); i < n; i++) {
            indexNames.add((m_indexes.get(i)).getName());
        }

        return indexNames;
    }