All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bazaarvoice.emodb.table.db.astyanax.PlacementUtil Maven / Gradle / Ivy

package com.bazaarvoice.emodb.table.db.astyanax;

import static java.lang.String.format;

public class PlacementUtil {
    public static String[] parsePlacement(String placement) {
        int colon = placement.indexOf(':');
        if (colon == -1) {
            throw new IllegalArgumentException(format(
                    "Placement string must be in the format ':': %s", placement));
        }
        String keyspaceName = placement.substring(0, colon);
        String columnFamilyPrefix = placement.substring(colon + 1);
        return new String[]{ keyspaceName, columnFamilyPrefix };
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy