-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for influxdb server version 0.9.3 #48
Comments
Hi, actually not, we probably work on those features in these days or weeks in order to be consistent with the influxdb changes. In particular with:
We probably create a new branch in order to support https://github.com/influxdb/influxdb/blob/master/CHANGELOG.md#v092-2015-07-24 |
I just add the explaining issue from InfluxDB |
With actual versions all numbers will results as float64. We probably adds a new configuration option that enable you to specify if you want to ensure integer data type during line protocol transformations. Force integers detection$options->setForceIntegers(true); //default as false
//...
$client->mark("serie", [
"point" => 12, // Marked as int64
]); Default behavior$options->setForceIntegers(false); //default as false
//...
$client->mark("serie", [
"point" => 12, // Marked as float64
]); Anybody see any possible issue with this behavior? |
In this moment we do not manage input values.. Input values for this library are transparent. Force integer$client->mark("serie", [
"point" => \InfluxDB\Filter\Integer::fromString("12"), // Marked as int64
]); |
@gianarb interesting proposal, maybe with immutable objects: $client->mark("serie", [
"point" => new \InfluxDB\Filter\Integer("12"), // Marked as int64
]); I don't know, i don't want to add too many components... I am thinking about type hinting in order to keep the library simple. Something like: $options->setForceIntegers(false); //default as false
$client->mark("serie", [
"point_as_float" => 12.0 // marked as float64
"point_as_float2" => 12, // marked as float64
"point_as_float3" => (int)14 // marked as float64
"point_as_string" => "12", // marked as string
]);
$options->setForceIntegers(true); //default as false
$client->mark("serie", [
"point_as_float" => 12.0 // marked as float64 (php double data type)
"point_as_int" => 12, // marked as int64 (php int data type)
"point_as_int2" => (int)"12", // marked as int64
"point_as_string" => "12", // marked as string
]); |
Yes I see your proposal.. I have no preference about them. |
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48.
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48.
https://github.com/influxdb/influxdb/releases/tag/v0.9.3-rc1 is out now. Do we have full support for it? Thanks. |
@skynet what is your opinion about integer data type support? How do you wait to implement this feature in this library?? :) Thanks |
Transparently. And I wouldn't worry about breaking changes since new line protocol is going to be the next big step. Is there a fork that would not fail with 0.9.3, or a patch for master? Recently updated to 0.9.3 rc1 and I am not sure if I can still insert data. |
You should be able to insert data with version 0.6.3 because changes in line protocol are not so big, the only issue should affects integer values that will be considered as https://patch-diff.githubusercontent.com/raw/corley/influxdb-php-sdk/pull/49.patch And try with the PR #49 |
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48.
So, the only difference could be in storage space used by InfluxDB? Otherwise I don't see how |
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48.
Not the storage space, influxdb cannot store multiple data value for the same column. If you use $client->mark("serie", [
"valid" => true,
]); And after $client->mark("serie", [
"valid" => 12.4,
]); InfluxDB cannot store point If you bring this situation to the $client->mark("serie", [
"cpu" => 12,
]); This is marked as $client->mark("serie", [
"cpu" => 12.4,
]); This second value cannot be stored in place because the column In InfluxDB Do you agree? |
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48. Steps: * Added configuration option `setForceIntegers` * Added data type doc * Updated influxdb configuration for version 0.9.3 * Added force integers integration tests * Refactored message to line protocol * InfluxDB database version as env variable **Refactored message to line protocol functions** Actually the `message_to_line_protocol` function need the options set. For that reason we have removed the `helpers.php` functions and moved those utilities int the `AdapterAbstract` abstract base class. **InfluxDB integration test environment variable** In order to change the InfluxDB version we have prepared an env variable in our Travis-CI configuration file `.travis.yml`
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48. Steps: * Added configuration option `setForceIntegers` * Added data type doc * Updated influxdb configuration for version 0.9.3 * Added force integers integration tests * Refactored message to line protocol * InfluxDB database version as env variable **Refactored message to line protocol functions** Actually the `message_to_line_protocol` function need the options set. For that reason we have removed the `helpers.php` functions and moved those utilities int the `AdapterAbstract` abstract base class. **InfluxDB integration test environment variable** In order to change the InfluxDB version we have prepared an env variable in our Travis-CI configuration file `.travis.yml`
As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution. Related to issue #48. Steps: * Added configuration option `setForceIntegers` * Added data type doc * Updated influxdb configuration for version 0.9.3 * Added force integers integration tests * Refactored message to line protocol * InfluxDB database version as env variable **Refactored message to line protocol functions** Actually the `message_to_line_protocol` function need the options set. For that reason we have removed the `helpers.php` functions and moved those utilities int the `AdapterAbstract` abstract base class. **InfluxDB integration test environment variable** In order to change the InfluxDB version we have prepared an env variable in our Travis-CI configuration file `.travis.yml`
Resolved with PR #49 merged in the master branch and tagged as 0.7.0 |
There might be some breaking changes in 0.9.2, particularly with inserting integer values.
influxdata/influxdb#3606
Is the library updated to support these changes in 0.9.2 (and soon 0.9.3)?
The text was updated successfully, but these errors were encountered: