Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Robbins committed Jul 18, 2011
1 parent 27310bb commit 703cc88
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 28 deletions.
8 changes: 4 additions & 4 deletions s4-comm/src/main/java/io/s4/comm/core/GenericSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public GenericSender(String zkAddress, String senderAppName,
* This method will send the data to receivers in a round robin fashion
*
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
@SuppressWarnings("unchecked")
public boolean send(Object data) {
Expand Down Expand Up @@ -127,7 +127,7 @@ public boolean send(Object data) {
*
* @param partition
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
@SuppressWarnings("unchecked")
public boolean sendToPartition(int partition, Object data) {
Expand Down Expand Up @@ -164,9 +164,9 @@ public boolean sendToPartition(int partition, Object data) {
/**
* compute partition using hashcode and send to appropriate partition
*
* @param partition
* @param hashcode
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
public boolean sendUsingHashCode(int hashcode, Object data) {
int partition = (hashcode & Integer.MAX_VALUE) % listenerTaskCount;
Expand Down
2 changes: 1 addition & 1 deletion s4-comm/src/main/java/io/s4/comm/core/ListenerProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ListenerProcess(String zkaddress, String clusterName) {
/**
* This will be a blocking call and will wait until it gets a task
*
* @return
* @return listener configuration
*/
public Object acquireTaskAndCreateListener(Map<String, String> map) {
TaskManager manager = CommServiceFactory.getTaskManager(zkaddress,
Expand Down
4 changes: 2 additions & 2 deletions s4-comm/src/main/java/io/s4/comm/core/MulticastSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public MulticastSender(Object senderConfigData) {
* This method will send the data to receivers in a round robin fashion
*
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
public boolean send(Object data) {
try {
Expand All @@ -70,7 +70,7 @@ public boolean send(Object data) {
*
* @param partition
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
public boolean send(int partition, Object data) {
return true;
Expand Down
8 changes: 4 additions & 4 deletions s4-comm/src/main/java/io/s4/comm/core/SenderProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void createSenderFromConfig(Object senderConfig) {
* This method will send the data to receivers in a round robin fashion
*
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
public boolean send(Object data) {
return genericSender.send(data);
Expand All @@ -104,7 +104,7 @@ public boolean send(Object data) {
*
* @param partition
* @param data
* @return
* @return true if data was successfully sent, false otherwise
*/
public boolean sendToPartition(int partition, Object data) {
return genericSender.sendToPartition(partition, data);
Expand All @@ -113,9 +113,9 @@ public boolean sendToPartition(int partition, Object data) {
/**
* compute partition using hashcode and send to appropriate partition
*
* @param partition
* @param hashcode
* @param data
* @return true on success, false on failure
* @return true if data was successfully sent, false otherwise
*/

public boolean sendUsingHashCode(int hashcode, Object data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class StaticTaskManager implements TaskManager {
* Constructor of TaskManager
*
* @param address
* @param name
* @param clusterName
*/
public StaticTaskManager(String address, String clusterName,
ClusterType clusterType, CommEventCallback callbackHandler) {
Expand Down
6 changes: 3 additions & 3 deletions s4-comm/src/main/java/io/s4/comm/zk/ZkQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public ZkQueue(String address, String name) {
/**
* Add element to the queue.
*
* @param i
* @return
* @param obj element to add
* @return true if add successful, false otherwise
*/

public boolean produce(Object obj) throws KeeperException,
Expand All @@ -78,7 +78,7 @@ public boolean produce(Object obj) throws KeeperException,
/**
* Remove first element from the queue.
*
* @return
* @return first element from the queue
* @throws KeeperException
* @throws InterruptedException
*/
Expand Down
2 changes: 1 addition & 1 deletion s4-comm/src/main/java/io/s4/comm/zk/ZkTaskManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ZkTaskManager(String address, String ClusterName, ClusterType clusterType
* Constructor of TaskManager
*
* @param address
* @param name
* @param ClusterName
*/
public ZkTaskManager(String address, String ClusterName, ClusterType clusterType,
CommEventCallback callbackHandler) {
Expand Down
4 changes: 2 additions & 2 deletions s4-comm/src/main/java/io/s4/comm/zk/ZkTaskSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ZkTaskSetup(String address, String clusterName, ClusterType clusterType)
* Constructor of ZkTaskSetup
*
* @param address
* @param name
* @param clusterName
*/
public ZkTaskSetup(String address, String clusterName, ClusterType clusterType,
CommEventCallback callbackHandler) {
Expand All @@ -62,7 +62,7 @@ public void setUpTasks(Object[] data) {
/**
* Creates task nodes.
*
* @param numTasks
* @param version
* @param data
*/
public void setUpTasks(String version, Object[] data) {
Expand Down
2 changes: 1 addition & 1 deletion s4-comm/src/main/java/io/s4/comm/zk/ZkUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static void main(String[] args) throws Exception {

if (method != null) {
ZkUtil zkUtil = new ZkUtil(address);
Object ret = method.invoke(zkUtil, methodArgs);
Object ret = method.invoke(zkUtil, (Object[]) methodArgs);
if (ret != null) {
System.out.println("**********");
System.out.println(ret);
Expand Down
2 changes: 1 addition & 1 deletion s4-core/src/main/java/io/s4/message/PrototypeRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public List<String> getQuery() {
/**
* Evaluate Request on a particular PE Prototype.
*
* @param pe
* @param pw
* prototype
* @return Response object.
*/
Expand Down
2 changes: 1 addition & 1 deletion s4-core/src/main/java/io/s4/message/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void setStream(String stream) {
* Partition Id from which this request originated. This may be used to
* return a response to the same partition.
*
* @return
* @return partition id
*/
public int getPartition() {
return partition;
Expand Down
7 changes: 2 additions & 5 deletions s4-core/src/main/java/io/s4/processor/AbstractPE.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
import org.apache.log4j.Logger;

/**
* This is the base class for processor classes. While it is possible to create
* a processor class by implementing the {@link ProcessingElement} interface, we
* suggest you instead extend this class.
* This is the base class for processor classes.
* <p>
* <code>AbstractProcessor</code> provides output frequency strategies that
* allow you to configure the rate at which your processor produces output (see
Expand Down Expand Up @@ -135,8 +133,7 @@ public AbstractPE() {
}

/**
* This implements the <code>execute</code> method declared in the
* {@link ProcessingElement} interface. You should not override this method.
* You should not override this method.
* Instead, you need to implement the <code>processEvent</code> method.
**/
public void execute(String streamName, CompoundKeyInfo compoundKeyInfo,
Expand Down
4 changes: 2 additions & 2 deletions s4-driver/java/src/main/java/io/s4/client/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class Driver {
* Note: this does not create a connection to the adapter.
*
* @see #init()
* @see #connect(ReadMode, WriteMode)
* @see #connect()
*
* @param hostname
* Name of S4 client adapter host.
Expand Down Expand Up @@ -220,7 +220,7 @@ public State getState() {
* is compatible with the protocol used by the adapter. This does not
* actually establish a connection for sending and receiving events.
*
* @see #connect(ReadMode, WriteMode)
* @see #connect()
*
* @return true if and only if the adapter issued a valid ID to this client,
* and the protocol is found to be compatible.
Expand Down

0 comments on commit 703cc88

Please sign in to comment.