-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from Flipkart/0.4
0.4 release
- Loading branch information
Showing
152 changed files
with
5,080 additions
and
3,147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ | |
*/dependency-reduced-pom.xml | ||
|
||
.DS_Store | ||
target/* | ||
config/test.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
sudo: false | ||
language: java | ||
jdk: | ||
- oraclejdk7 | ||
- oraclejdk8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Swapnil Marghade <s.g.marghade [at] gmail.com> | ||
|
||
|
||
RUN \ | ||
apt-get install -y --no-install-recommends software-properties-common \ | ||
&& add-apt-repository ppa:webupd8team/java \ | ||
&& gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \ | ||
&& apt-get update \ | ||
&& echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \ | ||
&& echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \ | ||
&& apt-get install -y --no-install-recommends oracle-java8-installer \ | ||
&& apt-get install -y --no-install-recommends curl | ||
|
||
EXPOSE 17000 | ||
EXPOSE 17001 | ||
|
||
VOLUME /var/log/foxtrot-server | ||
|
||
ADD config/docker.yml docker.yml | ||
ADD foxtrot-server/target/foxtrot*.jar server.jar | ||
ADD scripts/local_es_setup.sh local_es_setup.sh | ||
|
||
CMD sh -c "sleep 15 ; java -jar server.jar initialize docker.yml || true ; java -Dfile.encoding=utf-8 -jar server.jar server docker.yml" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
http: | ||
port: 17000 | ||
adminPort: 17001 | ||
connectorType: nonblocking | ||
|
||
elasticsearch: | ||
hosts: | ||
- elasticsearch | ||
cluster: elasticsearch | ||
tableNamePrefix: foxtrot | ||
|
||
hbase: | ||
secure : false | ||
tableName: foxtrot | ||
hbaseZookeeperQuorum: hbase | ||
hbaseZookeeperClientPort: 2181 | ||
|
||
cluster: | ||
name: foxtrot | ||
disableMulticast: true | ||
members: ["localhost:5701", "localhost:5702"] | ||
|
||
logging: | ||
level: INFO | ||
|
||
deletionconfig: | ||
active: true | ||
interval: 86400 | ||
initialdelay: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
elasticsearch: | ||
image: library/elasticsearch:1.7.3 | ||
hostname: elasticsearch | ||
command: elasticsearch -Des.http.cors.enabled=true | ||
ports: | ||
- "9200:9200" | ||
- "9300:9300" | ||
|
||
# hbase compose | ||
hbase: | ||
image: banno/hbase-standalone | ||
hostname: hbase | ||
ports: | ||
- "2181:2181" | ||
- "60000:60000" | ||
- "60010:60010" | ||
- "60020:60020" | ||
- "60030:60030" | ||
|
||
#enitity store compose | ||
foxtrot-server: | ||
links: | ||
- elasticsearch | ||
- hbase | ||
container_name: foxtrot_server | ||
build: . | ||
ports: | ||
- "17000:17000" | ||
- "17001:17001" | ||
volumes: | ||
- /var/log/foxtrot-server | ||
# enviroment valiables | ||
# environment: | ||
# - ZK_CONNECTION_STRING=hbase:2181 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,5 @@ public List<Filter> getFilters() { | |
public void setFilters(List<Filter> filters) { | ||
this.filters = filters; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
foxtrot-common/src/main/java/com/flipkart/foxtrot/common/DocumentMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.flipkart.foxtrot.common; | ||
|
||
/** | ||
* Metadata for a document | ||
*/ | ||
public class DocumentMetadata { | ||
private String id; | ||
private String rawStorageId; | ||
|
||
public DocumentMetadata() { | ||
} | ||
|
||
public DocumentMetadata(String id, String rawStorageId) { | ||
this.id = id; | ||
this.rawStorageId = rawStorageId; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getRawStorageId() { | ||
return rawStorageId; | ||
} | ||
|
||
public void setRawStorageId(String rawStorageId) { | ||
this.rawStorageId = rawStorageId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DocumentMetadata{" + | ||
"id='" + id + '\'' + | ||
", rawStorageId='" + rawStorageId + '\'' + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,23 +18,16 @@ | |
import com.flipkart.foxtrot.common.ActionRequest; | ||
import com.flipkart.foxtrot.common.Period; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.hibernate.validator.constraints.NotEmpty; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* User: Santanu Sinha ([email protected]) | ||
* Date: 21/03/14 | ||
* Time: 12:06 AM | ||
*/ | ||
public class HistogramRequest extends ActionRequest { | ||
@NotNull | ||
@NotEmpty | ||
private String table; | ||
|
||
private String table; | ||
|
||
@NotNull | ||
@NotEmpty | ||
private String field = "_timestamp"; | ||
|
||
private Period period; | ||
|
@@ -77,5 +70,4 @@ public String toString() { | |
.append("period", period) | ||
.toString(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,11 @@ | |
import com.flipkart.foxtrot.common.query.general.*; | ||
import com.flipkart.foxtrot.common.query.numeric.*; | ||
import com.flipkart.foxtrot.common.query.string.ContainsFilter; | ||
import com.flipkart.foxtrot.common.util.CollectionUtils; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* User: Santanu Sinha ([email protected]) | ||
|
@@ -46,6 +48,7 @@ | |
@JsonSubTypes.Type(value = NotEqualsFilter.class, name = FilterOperator.not_equals), | ||
@JsonSubTypes.Type(value = AnyFilter.class, name = FilterOperator.any), | ||
@JsonSubTypes.Type(value = ExistsFilter.class, name = FilterOperator.exists), | ||
@JsonSubTypes.Type(value = MissingFilter.class, name = FilterOperator.missing), | ||
|
||
//String | ||
@JsonSubTypes.Type(value = ContainsFilter.class, name = FilterOperator.contains), | ||
|
@@ -58,7 +61,6 @@ public abstract class Filter { | |
@JsonIgnore | ||
private final String operator; | ||
|
||
@NotNull | ||
private String field; | ||
|
||
protected Filter(String operator) { | ||
|
@@ -117,4 +119,12 @@ public boolean isTemporal() { | |
return false; | ||
} | ||
|
||
public Set<String> validate() { | ||
Set<String> validationErrors = new HashSet<>(); | ||
if (CollectionUtils.isNullOrEmpty(field)) { | ||
validationErrors.add("filter field cannot be null or empty"); | ||
} | ||
return validationErrors; | ||
} | ||
|
||
} |
Oops, something went wrong.