This project contains the gRPC interface to implement if you want to create your own crawler data processor.
The crawler data processor work with the crawler
- Create a directory with the same name as project name (use underscores instead of dashes) under
src/main/proto
directory (remove other files and directories if they exist). - Place your custom
.proto
files in created directory. Pay attention topackage
specifier andimport
statements. - Edit
release_version
andvcs_url
properties ingradle.properties
file. - Edit
rootProject.name
variable insettings.gradle
file. This will be the name of Java package. - Edit
package_info.json
file in order to specify name and version for Python package (create file if it's absent). - Edit parameters of
setup.py
insetup
function invocation such as:author
,author_email
,url
. Do not edit the others. - Edit
README.md
file according to the new project.
Note that the name of created directory under src/main/proto
directory is used in Python (it's a package name).
- Make your changes.
- Up version of Java package in
gradle.properties
file. - Up version of Python package in
package_info.json
file. - Commit everything.
If you wish to manually create and publish package for Java, run these command:
gradle --no-daemon clean build publish artifactoryPublish \
-Pbintray_user=${BINTRAY_USER} \
-Pbintray_key=${BINTRAY_KEY}
BINTRAY_USER
and BINTRAY_KEY
are parameters for publishing.
If you wish to manually create and publish package for Python:
- Generate services by gradle:
You can find the generated files by following path:
gradle --no-daemon clean generateProto
src/gen/main/services/python
- Generate code from
.proto
files and publish everything:pip install -r requirements.txt python setup.py generate python setup.py sdist twine upload --repository-url ${PYPI_REPOSITORY_URL} --username ${PYPI_USER} --password ${PYPI_PASSWORD} dist/*
PYPI_REPOSITORY_URL
,PYPI_USER
andPYPI_PASSWORD
are parameters for publishing.
- Update
th2-grpc-data-provider
Python dependency from0.1.4
to0.1.6
- Update
th2-bom
from3.0.0
to3.1.0
- Update
th2-grpc-common
from3.1.2
to3.8.0
- Add stubs for Python
- Use list of
MessageID
instead of mapping between session andMessageID
. User now will have to specifyMessageID
for both directions in the response if he or she needs to set a checkpoint. The list should contain a singleMessageID
for each pairalias + direction
. If more than one is found the last one (according to their sequences) will be taken. - The rpc methods was renamed according to the Protobuf naming convention (uses PascalCase).
- The event and message IDs from the response to connect method are removed because this functionality requires additional improvements on Crawler's side.
- New method that will be invoked by the crawler each time the new interval is started.