Git Product home page Git Product logo

tribune's People

Contributors

amejiarosario avatar babisroutis avatar clojj avatar iravid avatar rjw1 avatar samporapeli avatar sksamuel avatar szlwzl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tribune's Issues

Multiple indices and channels

Can I have multiple channels mapping to one different index each one?

So far I have been trying this workaround... I want to update access_point and and active_user ...

For the first one:

curl -XPUT 'http://localhost:9200/_river/redisriver/_meta' -d '{
    "type": "redis",
    "redis": {
        "json" : true,
        "channels": "access_point"
    },
    "index": {
        "name": "access_point"
    }
}'

So, I publish with

redis-cli PUBLISH access_point '{ "ipaddr": "0.0.0.0", "full_ipaddr":  "",  "total_clients": 0 }'

But, when I want to publish to the active_user index, even if update the _meta, I have to RESTART elasticsearch to pickup the changes....

curl -XPUT 'http://localhost:9200/_river/redisriver/_meta' -d '{
    "type": "redis",
    "redis": {
        "json" : true,
        "channels": "active_user"
    },
    "index": {
        "name": "active_user"
    }
}'
redis-cli PUBLISH active_user '{ "ipaddr": "192.168.101.81", "usage": 453, "macaddr": "e4:d5:3d:85:1e:ed", "domain": "domain_1" }'

What are your suggestion to get around this problem? and is there a way to pickup _meta changes without restarting elasticsearch?

Allow alias in place of index

Hi I'm using redisriver 1.1.0 and ES 1.4

I have an alias for time series data in ES

curl -XPOST localhost:9200/_aliases -d '
{
  "actions": 
        [
            { "add": { "alias": "cm", "index": "'$day'" }}
        ]
}'

when creating the redisriver with

curl -XPUT 'http://localhost:9200/_river/redisriver/_meta' -d '{
    "type": "redis",
    "redis": {
        "hostname": "localhost",
        "port" : "6379",
        "json" : true,
        "messageField" : "message",
        "channels": "rdr"
    },
    "index": {
        "name": "cm"
    }
}'

I get the following error in the ES log

[2014-11-28 11:24:43,657][ERROR][org.elasticsearch.plugin.river.redis.RedisSubscriber] ... error {}
org.elasticsearch.indices.InvalidIndexNameException: [cm] Invalid index name [cm], already exists as alias
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:197)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:558)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:87)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:243)
    at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:329)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Googling found that elasticsearch-river-mongodb had the same issue but it is now resolved.

richardwilly98/elasticsearch-river-mongodb#163

Cheers
Dale

Wildcard and pattern channels do not seem to work

Per you readme it appears that the redis river can subscribe to a channel pattern but it doesn't seem to work.

I've tried to subscribe to channels: '*' and I can't get the river to index any documents, if I subscribe to each individual channel it will begin to index

Is it support es 1.2.x ??

My es version 1.2.x

I installed it in es.
log display : [INFO ][org.elasticsearch.plugin.river.redis.RedisSubscriber] : Starting redis subscriber

But, I can't saw any data in es.

It's my config.
curl -XPUT "http://localhost:9200/_river/redisriver/_meta" -d '{
"type": "redis",
"redis": {
"hostname": "10.0.0.21",
"port" : "6379",
"json" : true,
"channels" : "*"
},
"index": {
"name": "redisindex"
}
}'

Do you have any suggest??

Thanks
Nick

Build fails on JDK17

When running ./gradlew check I get the following failure

> Task :tribune-core:compileKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tribune-core:compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (11).
  
  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

Sanitised value is not retuned as final valid result

1)The documentation says that:

The sanitized value is passed through the validation chain and so is present in any validations that occur after the sanitized call, as well as being included in the final result.

You can replicate the problem:

case class Username(value: String) 

val email = "[email protected]"

val validator = Validator[Username]
.sanitize(_.value)(_.toLowerCase)
.validate(_.value){_.matches("""^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$""")}

validator(Username(email)) shouldBe valid(Username(email.toLowerCase))

Is false

But when I change the order:

def validator = Validator[Username]
.validate(_.value){_.matches("""^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$""")}
.sanitize(_.value)(_.toLowerCase)

validator(Username(email)) shouldBe valid(Username(email.toLowerCase))

is true
2) Additionally, it looks like nested sanitisation does not work.

Unexpected shape of `Parser.flatMap()`

FlatMap function is currently defined as

fun <I, A, B, E> Parser<I, A, E>.flatMap(f: (A) -> EitherNel<E, B>): Parser<I, B, E> = ..

Given that actually Parser is a function (I)->EitherNel<E,O>, I find the above flatMap confusing.
I would expect that flatMap would have the shape bellow:

fun <I, O, E : E2, I2 : I, O2, E2> Parser<I, O, E>.flatMap(f: (O) -> Parser<I2, O2, E2>): Parser<I2, O2, E2> = ...

Nested errors don't appear to encode path properly

This is more or less from your example on the README:

import com.sksamuel.monkeytail.Validator
import com.sksamuel.monkeytail._
import com.sksamuel.monkeytail.ValidatorSyntax._

case class Designation(prefix: String, code: String)
case class Starship(name: String, maxWarp: Double, designation: Designation)

implicit val designationValidator = Validator[Designation]
  .validate(_.prefix)(prefix => prefix != null && (prefix.startsWith("NCC") || prefix.startsWith("NX")))
  .validate(_.code)(!_.isEmpty)

object MaxWarpExceededViolation extends Violation

val starshipValidator = Validator[Starship]
  .validate(_.name)(_ != null)
  .validate(_.maxWarp)(_ < 10)(MaxWarpExceededViolation)
  .valid(_.designation)(designationValidator) // this will require the previous implicit.

val starship = Starship("USS Enterprise", maxWarp = 5.0, designation = Designation("NCC-foo", ""))
val result = starshipValidator(starship)

The output of the result has what appears to be a bug in the path returned:

result: Validated[NonEmptyList[Violation],Starship] = Invalid(NonEmptyList(DefaultViolation(Invalid value: ,Path(List(code)))))

Path(List(code)) should be Path(List(designation, code))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.