Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STORM-1880] Support EXISTS Command Storm-Redis #1479

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ public void execute(Tuple input) {
lookupValue = jedisCommand.geopos(additionalKey, key);
break;

case EXISTS:
lookupValue = jedisCommand.exists(key);
break;

default:
throw new IllegalArgumentException("Cannot process such data type: " + dataType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* RedisDataTypeDescription defines data type and additional key if needed for lookup / store tuples.
*/
public class RedisDataTypeDescription implements Serializable {
public enum RedisDataType { STRING, HASH, LIST, SET, SORTED_SET, HYPER_LOG_LOG, GEO }
public enum RedisDataType { STRING, HASH, LIST, SET, SORTED_SET, HYPER_LOG_LOG, GEO, EXISTS }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fully aware of Redis terminology but EXISTS doesn't look like a data type. How do these data types relate to the redis operation. e.g. SORTED_SET and zscore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes . Maybe we should rename RedisDataType to Command it's more suitable .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would recommend that if RedisDataType is internal to storm code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zscore is a function about Sorted Set

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RedisMapper point out RedisDataType is hard to internal it into storm code ? I'm not sure ...


private RedisDataType dataType;
private String additionalKey;
Expand Down