Map null values to zeros in output in per-article endpoint

View counts for an article that are equal to 0 in any of
the dimensions are being stored as 'null' in cassandra, aqs code
should do the translation from one to the other.

Changes on aqs-new-cluster branch, do not merge to master

To push:
git push origin HEAD:refs/for/new-aqs-cluster

Bug: T144521
Change-Id: I49356d43db8b425a9c403154bd9b99b75116aeca
3 files changed
tree: 8028bccf9dc4797daa9dfe3f490751d0c4609a7c
  1. lib/
  2. projects/
  3. sys/
  4. test/
  5. v1/
  6. .dockerignore
  7. .gitignore
  8. .gitreview
  9. .jscs.json
  10. .jshintignore
  11. .jshintrc
  12. .travis.yml
  13. config.example.wikimedia.yaml
  14. config.test.yaml
  15. LICENSE
  16. package.json
  17. README.md
  18. server.js
README.md

Analytics Query Service

REST API for wikimedia projects pageviews data.

Installation

Make sure that you have node 4.4+:

Linux (Ubuntu)

sudo apt-get install nodejs nodejs-legacy nodejs-dev npm

Mac OS X

You can directly install node from packages downloads at: https://nodejs.org/en/download/

If you use brew be careful as it might be installing "too-new-of-a-version" You can run:

brew info node 

Brew formulas for node are available at: https://github.com/Homebrew/homebrew-core/blob/master/Formula/node.rb

From the query-service project directory, install the Node dependencies:

npm install

Start Query Service:

node server

The defaults without a config file should work for a local Cassandra installation with the default passwords. To customize Query Service's behavior, copy the example config to its default location:

cp config.example.yaml config.yaml

You can also pass in the path to another file with the -c commandline option to server.js. If you're running a single Cassandra instance (e.g. a local development environment), set defaultConsistency to one in config.yaml.

Testing

To run all the tests from a clean slate, first make sure Cassandra is running locally, then fire up the tests with npm:

npm test

Coverage

To check the test coverage, use npm, then browse the report:

npm run-script coverage

The coverage report can now be found in <project>/coverage/lcov-report/index.html.

  NODES
3d 3
HOME 2
mac 1
os 2
server 3