th2_grpc_crawler_data_processor
Project description
th2 gRPC crawler data processor library (0.3.2)
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
How to transform template
- Create a directory with the same name as project name (use underscores instead of dashes) under
src/main/protodirectory (remove other files and directories if they exist). - Place your custom
.protofiles in created directory. Pay attention topackagespecifier andimportstatements. - Edit
release_versionandvcs_urlproperties ingradle.propertiesfile. - Edit
rootProject.namevariable insettings.gradlefile. This will be the name of Java package. - Edit
package_info.jsonfile in order to specify name and version for Python package (create file if it's absent). - Edit parameters of
setup.pyinsetupfunction invocation such as:author,author_email,url. Do not edit the others. - Edit
README.mdfile 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).
How to maintain project
- Make your changes.
- Up version of Java package in
gradle.propertiesfile. - Up version of Python package in
package_info.jsonfile. - Commit everything.
How to run project
Java
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.
Python
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 generateProtosrc/gen/main/services/python - Generate code from
.protofiles 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_USERandPYPI_PASSWORDare parameters for publishing.
Changes:
0.3.1
- Update
th2-grpc-data-providerPython dependency from0.1.4to0.1.6
0.3.0
- Update
th2-bomfrom3.0.0to3.1.0 - Update
th2-grpc-commonfrom3.1.2to3.8.0 - Add stubs for Python
0.2.0 (Breaking changes)
Breaking:
- Use list of
MessageIDinstead of mapping between session andMessageID. User now will have to specifyMessageIDfor both directions in the response if he or she needs to set a checkpoint. The list should contain a singleMessageIDfor 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.
Added:
- New method that will be invoked by the crawler each time the new interval is started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file th2_grpc_crawler_data_processor-0.3.2.tar.gz.
File metadata
- Download URL: th2_grpc_crawler_data_processor-0.3.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
632bf5cee0a4448aa3e2a856a7abfea4b53d65b382ace7c98974e14207a875c3
|
|
| MD5 |
68552c183708d3bd1c957f19552fb4d5
|
|
| BLAKE2b-256 |
d817be3e8da90476794ca8b5ee82272e2f30acaa543176d5e9b9e03ba54d867b
|