未验证 提交 437b07a6 编写于 作者: A Avi Aryan

cleanup #36

# Conflicts:
#	READMEMACOS.md
#	READMEWINDOWS.md
上级 9a8a9b3c
## v0.3.1 [2017-03-24]
# Changelog
### Features
- added `js` alias for `goja` transform function [#335](https://github.com/compose/transporter/pull/335)
- `init` command will now prompt user when `pipeline.js` file already exists [#336](https://github.com/compose/transporter/pull/336)
### Bugfixes
- fixed mongodb, rabbitmq, and rethinkdb adaptors from not trying to read from a file when provided in the `ca_certs` field [#334](https://github.com/compose/transporter/pull/334)
## v0.3.0 [2017-03-21]
### Breaking changes
***PLEASE READ***
Transporter no longer requires a YAML file. All configuration is in the JS file where nodes are defined and a new DSL has been developed. Run the `init` command to see the new changes.
- if using transporter as a library, all packages have been moved out of `pkg` to the top-level
- `eval` command removed
- `list` command removed
- the `namespace` parameter now only expects a single part (the regexp filter), all adaptors have been updated to pull the "database name" from the provided URI
### Features
- NEW RabbitMQ adaptor [#298](https://github.com/compose/transporter/pull/298)
- MongoDB adaptor supports per collection query filter when needing to copy only a subset of data [#301](https://github.com/compose/transporter/pull/301)
- [goja](https://github.com/dop251/goja) added as an option for the JavaScript VM in transformers [#294](https://github.com/compose/transporter/pull/294)
- NEW [native functions](https://github.com/compose/transporter#native-functions)
### Bugfixes
## v0.2.2 [2017-03-20]
### Features
### Bugfixes
- attempted fix for mejson.S conversion to json column in postgres adaptor [#314](https://github.com/compose/transporter/issues/314)
## v0.2.1 [2017-03-07]
### Features
- added RethinkDB -> PostgreSQL integration test
### Bugfixes
- fixed connection leak in PostgreSQL client
## v0.2.0 [2017-02-28]
### Breaking changes
- The etcd adaptor was removed
### Features
- Integration tests are run weekly for the following pipelines:
1. MongoDB -> MongoDB
2. MongoDB -> Elasticsearch
3. MongoDB -> RethinkDB
- RethinkDB SSL support added in [#268](https://github.com/compose/transporter/pull/268)
- RethinkDB performs bulk inserts now, [#276](https://github.com/compose/transporter/pull/276)
- `transporter init [source] [sink]` command added in [#279](https://github.com/compose/transporter/pull/279)
### Bugfixes
- MongoDB adaptor could cause the pipeline to stop due to a concurrent flush operation, fixed via [#271](https://github.com/compose/transporter/pull/271)
- When being used as a library, several goroutines were leaking after the pipeline had stopped. Reported by @cognusion in [#265](https://github.com/compose/transporter/issues/265) and addressed via [#268](https://github.com/compose/transporter/pull/268) and [#280](https://github.com/compose/transporter/pull/280)
## v0.1.3 [2017-02-09]
### Breaking changes
- namespace processing no longer expects their the be a "db" portion (i.e. "database.collection")
but an attempt to maintain backwards compatibility is still there for the time being.
[#258](https://github.com/compose/transporter/pull/258)
### Bugfixes
- [#261](https://github.com/compose/transporter/pull/261): return a nil message to get skipped in the pipeline
## v0.1.2 [2017-01-27]
This release is primarily aimed at getting the MongoDB and Elasticsearch adaptors into a
stable/reliable state.
### Breaking changes
- MongoDB adaptor SSL configuration is now defined as:
```yaml
nodes:
localmongo:
type: mongodb
ssl: true
cacerts: ["/path/to/cert.pem"] # optional
```
### Bugfixes
- [#211](https://github.com/compose/transporter/pull/211): defer bulk channel init for mongo node reuse
- [#213](https://github.com/compose/transporter/pull/213): track mongodb \_id field so we can attempt to reissue queries
- [#233](https://github.com/compose/transporter/pull/233): update elasticsearch adaptor with better support
for multiple versions of elasticsearch as well as better performance with bulk indexing for most versions.
Addresses [#209](https://github.com/compose/transporter/issues/209), [#222](https://github.com/compose/transporter/issues/222),
[#167](https://github.com/compose/transporter/issues/167) and [#159](https://github.com/compose/transporter/issues/159).
- properly detect oplog access when attempting to use the `tail` option on the MongoDB adaptor.
## v0.1.1 [2015-08-27]
This release contains the first step to getting savable state into adaptors for the ability to resume.
### Features
- [#116](https://github.com/compose/transporter/pull/116): Adaptor state phase 1, begins to address [#33](https://github.com/compose/transporter/issues/33)
### Bugfixes
- [#124](https://github.com/compose/transporter/issues/124): Update elasticsearch adaptor
## v0.1.0 [2015-08-06]
This release contains several breaking changes but is a first step towards a stable API/DSL.
### Features
- [#95](https://github.com/compose/transporter/pull/95): add a Noop message type, and the ability to skip messages, fixes [#93](https://github.com/compose/transporter/issues/93)
- [#100](https://github.com/compose/transporter/pull/100): replace environment variables, fixes [#88](https://github.com/compose/transporter/issues/88)
- [#101](https://github.com/compose/transporter/pull/101): (Phase 1) Multi namespace support, addresses [#78](https://github.com/compose/transporter/issues/78) and [#23](https://github.com/compose/transporter/issues/23)
### Bugfixes
- [#94](https://github.com/compose/transporter/pull/94): jsonlog, fixes [#92](Comment doesnt reflect jsonlog output)
- [#98](https://github.com/compose/transporter/pull/98): Fixes influx_test.js, thanks @ExNexu!
- [#97](https://github.com/compose/transporter/pull/97): throw transformer initialization errors early, fixes [#96](https://github.com/compose/transporter/issues/96)
## v0.0.4 [2015-07-13]
This release contains several breaking changes:
- Transporter now uses [godep](https://github.com/tools/godep) for vendoring depedencies.
- transformer functions now receive a document in the following format:
```
{
"op": "insert/update/delete",
"data": "", // what use to be passed in the doc passed to the transformer function
"ts": 1436794521, // the number of seconds elapsed since January 1, 1970 UTC
}
```
The same document must be returned from the function so any modifications must happen to `doc["data"]`.
***NOTE***: Deletes are now passed to the transformer functions so this needs to be accounted for.
### Features
- [#46](https://github.com/compose/transporter/pull/46): add a JsonLog.
- [#64](https://github.com/compose/transporter/pull/64): New Source Adapter: Implements RethinkDB as a source of documents. Thanks @alindeman!
- [#68](https://github.com/compose/transporter/pull/68): Deletes from Mongo write adaptor.
- [#72](https://github.com/compose/transporter/pull/72): Allows RethinkDB timeout to be configured.
- [#83](https://github.com/compose/transporter/pull/83): RethinkDB: Changes for v1 RethinkDB driver.
- [#86](https://github.com/compose/transporter/pull/86): Use godep to vendor required libraries.
- [#87](https://github.com/compose/transporter/pull/87): add SSL support for MongoDB, bump mgo.
- [#90](https://github.com/compose/transporter/pull/90): ***NOTE*** BREAKING CHANGE: send more info in doc to transformers.
### Bugfixes
- [#47](https://github.com/compose/transporter/pull/47): A few readme grammar fixes. Thanks @mm-!
- [#49](https://github.com/compose/transporter/pull/49): fixes [#48](https://github.com/compose/transporter/issues/48)
- [#51](https://github.com/compose/transporter/pull/51): fixes [#50](https://github.com/compose/transporter/issues/50)
- [#54](https://github.com/compose/transporter/pull/54): import rethinkdb from gopkg.in. it's still v0, so this will change still.
- [#55](https://github.com/compose/transporter/pull/55): remove influx until the state of the repository settles or we get proper vendoring in place.
- [#63](https://github.com/compose/transporter/pull/63): use a smaller buffer for mongo adaptor.
- [#65](https://github.com/compose/transporter/pull/65): Extracts only the relevant pieces of the version string. Thanks @alindeman!
- [#85](https://github.com/compose/transporter/pull/85): ensure we're at version >=2.0 of rethink for this driver.
## v0.0.3 [2015-01-14]
### Features
- [#36](https://github.com/compose/transporter/pull/36): Simplifies the config.yaml and node configuration.
- [#38](https://github.com/compose/transporter/pull/38): add a quick benchmark to transformOne
### Bugfixes
- [#37](https://github.com/compose/transporter/pull/37): fixes [#29](https://github.com/compose/transporter/issues/29)
- [#42](https://github.com/compose/transporter/pull/42): fixes [#41](https://github.com/compose/transporter/issues/41)
- [#44](https://github.com/compose/transporter/pull/44): fix a logical error. check for transporter first.
- [#45](https://github.com/compose/transporter/pull/45): add a bulk writer, and writeconcern options for mongo.
## v0.0.2 [2014-12-29]
### Features
- [#22](https://github.com/compose/transporter/pull/22): adaptor constructor refactor, new `transporter about` command.
- [#26](https://github.com/compose/transporter/pull/26): adds the name and description to about.
- [#27](https://github.com/compose/transporter/pull/27): Instructions for building Transporter on Windows.
- [#31](https://github.com/compose/transporter/pull/31): add some more information in errors that we get in the javascript.
- [#32](https://github.com/compose/transporter/pull/32): Fix typo in registry comments for doc gen.
### Bugfixes
- [#7](https://github.com/compose/transporter/pull/7): Make list informative, stop arg panics.
- [#9](https://github.com/compose/transporter/pull/9): beginners guide for os x. Thanks @sberryman!
- [#10](https://github.com/compose/transporter/pull/10): Pretty print the list.
- [#11](https://github.com/compose/transporter/pull/11): fix the config.yaml example to show the proper interval syntax.
- [#13](https://github.com/compose/transporter/pull/15): makes the api in the config.yaml optional.
- [#18](https://github.com/compose/transporter/pull/18): check that errors aren't nil.
- [#20](https://github.com/compose/transporter/pull/20): log any adaptor.ERROR or adaptor.CRITICAL.
## v0.0.1 [2014-12-12]
### Release Notes
This is the initial release of Transporter.
# Contributing to Transporter
# Contributing to ABC
Want to help build Trasporter? Great! This should help get you started
and hit us up if you have any questions.
## Topics
* [Architecture and Adaptor Enhancements](#architecture-and-adaptor-enhancements)
* [Reporting Issues](#reporting-issues)
* [Contribution Guidelines](#contribution-guidelines)
## Architecture and Adaptor Enhancements
When considering an architecture enhancement, we are looking for:
* A description of the problem this change solves
* An issue describing the design changes
* Please prefix your issue with `Enhancement:` in the title
* Please review [the existing Enhancements](https://github.com/compose/transporter/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)
before reporting a new one.
When considering an adaptor enhancement, we are looking for:
* A description of the use case
* Please note any logic changes if necessary
* A pull request with the code
* Please prefix your PR's title with `Adaptor:` so we can quickly address it.
* Your pull request must remain up to date with master, so rebase as necessary.
## Reporting Issues
A great way to contribute to the project is to send a detailed report when you
encounter an issue. We always appreciate a well-written, thorough bug report,
and will thank you for it!
When reporting [issues](https://github.com/compose/transporter/issues) on
GitHub please include your host OS (Ubuntu 12.04, Fedora 19, etc).
Please include:
* The output of `uname -a`.
* The output of `transporter version`.
Please also include the steps required to reproduce the problem if
possible and applicable. This information will help us review and fix
your issue faster.
## Contribution guidelines
### Pull requests are always welcome
We are always excited to receive pull requests, and do our best to
process them as quickly as possible. Not sure if that typo is worth a pull
request? Do it! We will appreciate it.
If your pull request is not accepted on the first try, don't be
discouraged! If there's a problem with the implementation, hopefully you
received feedback on what to improve.
We're trying very hard to keep Transporter lean and so use of stdlib is encourage.
We don't want it to do everything for everybody. This means that we might decide against
incorporating a new feature. However, there might be a way to implement
that feature while still using Transporter.
### Create issues...
Any significant improvement should be documented as [a GitHub
issue](https://github.com/compose/transporter/issues) before anybody
starts working on it.
### ...but check for existing issues first!
Please take a moment to check that an issue doesn't already exist
documenting your bug report or improvement proposal. If it does, it
never hurts to add a quick "+1" or "I have this problem too". This will
help prioritize the most common problems and requests.
### Conventions
Fork the repository and make changes on your fork in a feature branch:
- If it's a bug fix branch, name it XXXX-something where XXXX is the number of the
issue.
- If it's a feature branch, create an enhancement issue to announce your
intentions, and name it XXXX-something where XXXX is the number of the issue.
Submit unit tests for your changes. Go has a great test framework built in; use
it! Take a look at existing tests for inspiration. Run the full test suite (including
integration tests) on your branch before submitting a pull request.
Update the documentation when creating or modifying features.
Write clean code. Universally formatted code promotes ease of writing, reading,
and maintenance. Always run `gofmt -s -w file.go` on each changed file before
committing your changes. Most editors have plug-ins that do this automatically.
Pull requests descriptions should be as clear as possible and include a
reference to all the issues that they address.
Code review comments may be added to your pull request. Discuss, then make the
suggested modifications and push additional commits to your feature branch. Be
sure to post a comment after pushing. The new commits will show up in the pull
request automatically, but the reviewers will not be notified unless you
comment.
Pull requests must be cleanly rebased ontop of master without multiple branches
mixed into the PR.
**Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
feature branch to update your pull request rather than `merge master`.
Before the pull request is merged, make sure that you squash your commits into
logical units of work using `git rebase -i` and `git push -f`. After every
commit the test suite should be passing. Include documentation changes in the
same commit so that a revert would remove all traces of the feature or fix.
Commits that fix or close an issue should include a reference like
`Closes #XXXX` or `Fixes #XXXX`, which will automatically close the
issue when merged.
Please do not add yourself to the `AUTHORS` file, as we will keep track of changes
and update the file when needed.
We follow Gofmt + Golint standard.
......@@ -139,19 +139,19 @@ abc login --help
<a name="importer-features"></a>
### 4.2 Importer features
Transporter allows the user to configure a number of data adaptors as sources or sinks. These can be databases, files or other resources. Data is read from the sources, converted into a message format, and then send down to the sink where the message is converted into a writable format for its destination. The user can also create data transformations in JavaScript which can sit between the source and sink and manipulate or filter the message flow.
ABC allows the user to configure a number of data adaptors as sources or sinks. These can be databases, files or other resources. Data is read from the sources, converted into a message format, and then send down to the sink where the message is converted into a writable format for its destination. The user can also create data transformations in JavaScript which can sit between the source and sink and manipulate or filter the message flow.
Adaptors may be able to track changes as they happen in source data. This "tail" capability allows a Transporter to stay running and keep the sinks in sync.
Adaptors may be able to track changes as they happen in source data. This "tail" capability allows a ABC to stay running and keep the sinks in sync.
#### BETA Feature
As of release `v0.4.0`, transporter contains support for being able to resume operations
As of release `v0.4.0`, ABC contains support for being able to resume operations
after being stopped. The feature is disabled by default and can be enabled with the following:
```
source = mongodb({"uri": "mongo://localhost:27017/source_db"})
sink = mongodb({"uri": "mongo://localhost:27017/sink_db"})
t.Config({"log_dir":"/data/transporter"})
t.Config({"log_dir":"/data/ABC"})
.Source("source", source)
.Save("sink", sink)
```
......@@ -218,8 +218,6 @@ Details have been covered in the Wiki page : [Importer Commands](https://github.
## Building guides
[macOS](https://github.com/appbaseio-confidential/abc/blob/master/READMEMACOS.md)
[Windows](https://github.com/appbaseio-confidential/abc/blob/master/READMEWINDOWS.md)
[Vagrant](https://github.com/appbaseio-confidential/abc/blob/master/READMEVAGRANT.md)
......
# Building Transporter with macOS
- follow instructions on http://golang.org/doc/install
- VERY IMPORTANT: Go has a required directory structure which the GOPATH needs to point to. Instructions can be found on http://golang.org/doc/code.html or by typing `go help gopath` in terminal.
- setup the directory structure in $GOPATH
- `cd $GOPATH; mkdir src pkg bin`
- create the github.com path and compose `mkdir -p src/github.com/compose; cd src/github.com/compose`
- clone transporter `git clone https://github.com/compose/transporter; cd transporter`
- now you can build with `go build ./cmd/transporter/...`
At this point you should be able to run transporter via `$GOPATH/bin/transporter`, you may need to add $GOPATH to your PATH environment variable. Something along the lines of `export PATH="$GOPATH/bin:$PATH"` should work.
# Building Transporter on Windows
1) Install Go
First step, download and install Go. Go to [https://golang.org/dl/](https://golang.org/dl/) and install the `go1.4.windows-amd64.msi ` file offered.
2) Install Git
Go supports multiple source code control systems and you need to get the tools to handle them. Refer to [https://github.com/golang/go/wiki/GoGetTools](https://github.com/golang/go/wiki/GoGetTools) for the canonical current list.
First and foremost, we need Git...
Go to [http://git-scm.com/downloads](http://git-scm.com/downloads) and download the Windows version. Install that. It's a good idea to select to option to put the Git Bash shell either on your desktop or somewhere equally accessible.
3) Install Mercurial
The other source code control tool you'll need for this build is Mercurial, so go to [http://mercurial.selenic.com/wiki/Download](http://mercurial.selenic.com/wiki/Download) and download `Mercurial-3.2.3 (64-bit msi)`.
4) Make directories
Start the Git Bash shell. We now need to make the go build hierachy:
```
mkdir go
```
We need to set the GOPATH environment variable. This is going to point at the directory we just made and lets Go locate other packages. We'll just set it temporarily here like so:
```
export GOPATH=`pwd`/go/
```
Nowe we can build the rest of the tree:
```
cd go
mkdir pkg bin src
cd src
mkdir github.com
cd github.com
mkdir compose
cd compose
```
5) Clone transporter
We now can download the transporter source into this directory
```
git clone https://github.com/compose/transporter
```
6) Get the dependencies
And with the source downloaded, we can go into the directory and ask it to download all the libraries it depends upon.
```
cd transporter
go get -a ./cmd/transporter
```
7) Build the transporter
Finally, we can issue the build command
```
go build -a ./cmd/transporter
```
and that should give us ```transporter.exe``` in the current directory.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册