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

Fixes for successful windows build #121

Merged
merged 4 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ postgres = { version = "0.17.2", features = ["with-serde_json-1", "with-chrono-0
postgres-protocol = "0.5"
tokio-postgres = "0.5"

# kafka
rdkafka = "0.23"
# kafka. cmake is the encouraged way to build this and also the one that works on windows.
rdkafka = { version = "0.23", features = ["cmake-build"] }

# crononome
cron = "0.6.0"
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Tremor   [![Build Status]][actions-Tests] [![Quality Checks]][actions-Checks] [![License Checks]][actions-License-audit] [![Security Checks]][actions-Security-audit] [![Code Coverage]][codecov.io] [![Dependabot Status]][dependabot.com]
# Tremor

[![Build Status]][actions-Tests] [![Quality Checks]][actions-Checks] [![License Checks]][actions-License-audit] [![Security Checks]][actions-Security-audit] [![Code Coverage]][codecov.io] [![Dependabot Status]][dependabot.com]

[Build Status]: https://github.com/wayfair-tremor/tremor-runtime/workflows/Tests/badge.svg
[actions-Tests]: https://github.com/wayfair-tremor/tremor-runtime/actions?query=workflow%3ATests
Expand All @@ -15,7 +17,7 @@

---

In short, tremor is an event processing system. It was originally designed as a replacement for software such as [Logstash](https://www.elastic.co/products/logstash) or [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/). However tremor has outgrown this singular use case by supporting more complex workflows such as aggregation, rollups, an ETL language, and a query language.
In short, Tremor is an event processing system. It was originally designed as a replacement for software such as [Logstash](https://www.elastic.co/products/logstash) or [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/). However tremor has outgrown this singular use case by supporting more complex workflows such as aggregation, rollups, an ETL language, and a query language.

More about the [history](https://docs.tremor.rs/history/) and [architecture](dochttps://docs.tremor.rs/overview/) can be found in [the documentation](https://docs.tremor.rs/).

Expand Down Expand Up @@ -61,9 +63,11 @@ Note that sice the image is building tremor in release mode it requires some ser

### Local builds

If you are not comfortable with managing library packages on your system or don't have experience with , please use the Docker image provided above. Local builds are not supported and purely at your own risk.
If you are not comfortable with managing library packages on your system or don't have experience with, please use the Docker image provided above. Local builds are not supported and purely at your own risk.

For local builds, tremor requires rust 2018 (version `1.31` or later), along with all the tools needed to build rust programs. Eg: for centos, the packages `gcc`, `make`, `cmake`, `clang`, `openssl`, and `libstdc++` are required. For different distributions or operating systems, please install the packages accordingly.

For local builds, tremor requires rust 2018 (version `1.31` or later), along with all the tools needed to build rust programs. For centos the packages `gcc`, `make`, `cmake`, `clang`, `openssl`, and `libstdc++` are required, for different distributions or operating systems, please install packages accordingly.
For a more detailed guide on local builds, please refer to the [tremor development docs](https://docs.tremor.rs/development/quick-start/).

## Running locally

Expand Down Expand Up @@ -188,9 +192,3 @@ To execute a benchmark, build tremor in **release** mode and run the examples fr
```bash
./bench/run <name>
```

### Ubuntu

```bash
sudo apt install git libssl-dev llvm-9-dev libclang-dev cmake
```
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ error_chain! {
YAMLError(serde_yaml::Error) #[doc = "Error during yaml parsing"];
JSONError(simd_json::Error);
SerdeError(serde_json::Error);
Io(std::io::Error) #[cfg(unix)];
Io(std::io::Error);
SinkDequeueError(async_sink::SinkDequeueError);
SinkEnqueueError(async_sink::SinkEnqueueError);
FromUTF8Error(std::string::FromUtf8Error);
Expand Down
2 changes: 1 addition & 1 deletion src/preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl SliceTrim for [u8] {

if let Some(first) = self.iter().position(is_not_whitespace) {
if let Some(last) = self.iter().rposition(is_not_whitespace) {
&self[first..last + 1]
&self[first..=last]
} else {
&self[first..]
}
Expand Down
2 changes: 1 addition & 1 deletion tremor-api/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub fn accept(req: &Request) -> ResourceType {
// TODO implement correctly / RFC compliance
match req.header("Accept") {
Some("application/yaml") => ResourceType::Yaml,
Some("application/json") | _ => ResourceType::Json,
_ => ResourceType::Json,
}
}

Expand Down
2 changes: 1 addition & 1 deletion tremor-pipeline/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ error_chain! {
YAMLError(serde_yaml::Error) #[doc = "Error during yaml parsing"];
JSONError(simd_json::Error);
SerdeError(serde_json::Error);
Io(std::io::Error) #[cfg(unix)];
Io(std::io::Error);
FromUTF8Error(std::string::FromUtf8Error);
UTF8Error(std::str::Utf8Error);
ParseIntError(std::num::ParseIntError);
Expand Down
4 changes: 2 additions & 2 deletions tremor-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl<'a> TremorApp<'a> {
.get_matches();
let format = match cmd.value_of("format") {
Some("json") => FormatKind::Json,
Some("yaml") | _ => FormatKind::Yaml,
_ => FormatKind::Yaml,
};
Ok(Self {
app: cmd,
Expand Down Expand Up @@ -463,7 +463,7 @@ async fn conductor_version_cmd(app: &TremorApp<'_>, cmd: &ArgMatches<'_>) -> Res
"{}",
match cmd.value_of("format") {
Some("yaml") => serde_yaml::to_string(&version)?,
Some("json") | _ => serde_json::to_string(&version)?,
_ => serde_json::to_string(&version)?,
}
);
Ok(())
Expand Down