Download the PHP package r4j4h/php-druid-ingest without Composer

On this page you can find all versions of the php package r4j4h/php-druid-ingest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-druid-ingest

php-druid-ingest

Experimental PHP wrapper around ingesting data from a variety of data sources into Druid as a data source.

Overview

The wrapper lives in the namespace PhpDruidIngest.

Classes provide for the various tasks related to the extraction, transformation, and loading of data from other sources into druid. This involves:

  1. the extraction, transformation, and loading of that data
  2. preparing it in a place and format ready for Druid
  3. the generation of a compatible Druid indexing task
  4. the execution of the indexing task
  5. usage of the returned job id for monitoring of the indexing task job, and
  6. removal of prepared ingestion data after Druid has finished ingesting the file.

When executed, this will need to live on the Druid node that will ingest the data, using LocalFilePreparer. Otherwise it will need a way to move or stream the file from itself to the destination Node (say via scp). RemoteSCPPreparer is an initial stab at this.

Design

  1. Instantiate a IFetcher, configured to fetch the desired records for the desired time periods.
  2. Instantiate a IPreparer to record the results in memory or in file, tranfser results to destination, returning the destination path
  3. Instantiate a IDruidQueryParameters, configured with parameters. <-- was dimension definition, now index task params + path from IFetcher
  4. Instantiate a IDruidQueryExecutor, configured to hit a Druid endpoint.
  5. Instantiate a IDruidQueryGenerator. <-- index task generator
  6. Instantiate a IDruidQueryResponseHandler. <-- gets the task id
  7. Run the IDruidQueryExecutor's executeQuery function with the IDruidQuery, getting the result.
  8. Hand the resulting task id to IDruidJobWatcher who polls until task succeeds or finishes
  9. IPreparer then cleans up left over ingestion file

Fetchers are the most interesting element in play here. By adding new Fetchers we can support new input sources. Initially we are using mysqli to handle fetching from MySQL databases. Fetching from HTTP endpoints, or a log, or running map/reduce or storm and getting the results results are all good ideas for other fetchers.

Please refer to this diagram for an overview of how this works underneath the hood:

(From this Dynamic LucidChart Source URL)

How to Test

From the root directory, in a command terminal run: php vendor/bin/phpunit tests or more preferably php vendor/bin/phing.

Generate Documentation

From the root directory, in a command terminal run: php vendor/bin/phing docs.

How to Install

Right now, there is no tagged version. To be ready for it when it comes, branch-aliases are in place.

To install, it is suggested to use Composer. If you have it installed, then the following instructions in a composer.json should be all you need to get started:

If you are using PHP 5.3, there is a bug and you will need to use an alternative branch.

Up to date PHP:

PHP 5.3 Compatibility:

Once that is in, composer install and composer update should work.

Once those are run, require Composer's autoloader and you are off to the races:

  1. require 'vendor/autoload.php';

References


All versions of php-druid-ingest with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
psr/log Version 1.0.0
guzzle/guzzle Version ~3.9
symfony/console Version 2.5.4
r4j4h/php-druid-query Version 1.0.x-dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package r4j4h/php-druid-ingest contains the following files

Loading the files please wait ....