Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Document string-formatted arguments #580

Merged
merged 2 commits into from

2 participants

@akaIDIOT

Some arguments in Hector are provided as a String, although they really represent multiple things. The encoding for this is currently undocumented and require a look in the source code to find out. There are many many more things in the source code that have no documentation at all, consider this my small contribution in fixing this :).

The reference included for the comparator type alias is the best I could find in the DataStax documentation, though it might not be the one it's actually based on.

@zznate
Collaborator

Cool - thanks a lot. Every little bit helps :)

@zznate zznate merged commit 14f1ea5 into hector-client:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
10 core/src/main/java/me/prettyprint/cassandra/service/CassandraHostConfigurator.java
@@ -57,6 +57,11 @@ public CassandraHostConfigurator() {
this.hosts = null;
}
+ /**
+ * Creates a new {@code CassandraHostConfigurator} from the specified hosts String, formatted as
+ * {@code host[:port][,host[:port]...]}.
+ * @param hosts The hosts to create {@link CassandraHost}s from.
+ */
public CassandraHostConfigurator(String hosts) {
this.hosts = hosts;
}
@@ -90,6 +95,11 @@ public void applyConfig(CassandraHost cassandraHost) {
}
}
+ /**
+ * Specifies the hosts String, formatted as
+ * {@code host[:port][,host[:port]...]}.
+ * @param hosts The hosts to create {@link CassandraHost}s from.
+ */
public void setHosts(String hosts) {
this.hosts = hosts;
}
View
8 core/src/main/java/me/prettyprint/hector/api/ddl/ColumnFamilyDefinition.java
@@ -28,6 +28,14 @@
void setSubComparatorType(ComparatorType subComparitorType);
String getComparatorTypeAlias();
+
+ /**
+ * Sets the type alias for the comparator to be used for the row keys of the column family.
+ * For composite types, supply the alias in the following format:
+ * {@code (TypeName1, TypeName2, ...)}.
+ * @param alias An alias String defining the comparator to be used for the row keys.
+ * @see <a href="http://www.datastax.com/docs/1.1/ddl/column_family#about-data-types-comparators-and-validators">DataStax column family reference</a>
+ */
void setComparatorTypeAlias(String alias);
String getSubComparatorTypeAlias();
Something went wrong with that request. Please try again.