import org.geotools.data.*;

import java.util.*;
import java.io.*;

public class geo
{
    public static void main(String[] args)
    {
        try
        {
            final boolean mock = true;
            DataStore ds = createDataStore(mock);
        }
        catch(IOException e)
        {
            e.printStackTrace();
        }
    }

    public static DataStore createDataStore(boolean mock) throws IOException
    {
        Map<String, Serializable> params = new HashMap<String, Serializable>();

        params.put("instanceId", "inst");
        params.put("zookeepers", "localhost:2181");
        params.put("user", "userName");
        params.put("password", "pw");
        params.put(
                "auths",
                "Table.READ,Table.WRITE,Table.BULK_IMPORT,Table.ALTER_TABLE," +
                "Table.GRANT,Table.DROP_TABLE");
        params.put("tableName", "tbl");
        params.put("useMock", mock ? "true" : "false");

        return DataStoreFinder.getDataStore(params);
    }
}

