diff --git a/bigtable/api/README.md b/bigtable/api/README.md new file mode 100644 index 0000000000..fcc35f1dc8 --- /dev/null +++ b/bigtable/api/README.md @@ -0,0 +1,38 @@ +# Google BigTable Sample + +## Description + +All code in the `src` directory demonstrates how to connect to Cloud Bigtable and run some basic operations to create instance, create cluster, delete instance and delete cluster. + +## Build and Run +1. **Enable APIs** - [Enable the BigTable API](https://console.cloud.google.com/flows/enableapi?apiid=bigtable) + and create a new project or select an existing project. +2. **Download The Credentials** - Click "Go to credentials" after enabling the APIs. Click "New Credentials" + and select "Service Account Key". Create a new service account, use the JSON key type, and + select "Create". Once downloaded, set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` + to the path of the JSON key that was downloaded. +3. **Clone the repo** and cd into this directory + ```sh + $ git clone https://github.com/GoogleCloudPlatform/php-docs-samples + $ cd php-docs-samples/bigtable/api + ``` + +4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md). + Run `php composer.phar install` (if composer is installed locally) or `composer install` + (if composer is installed globally). +5. Run `php SNIPPET_NAME.php`. The usage will print for each if no arguments + are provided: + ```sh + $ php src/run_instance_operations.php + Usage: php src/run_instance_operations.php PROJECT_ID INSTANCE_ID TABLE_ID + + $ php src/run_instance_operations.php your-project-id your-instance-id your-table-id + ``` + +## Contributing changes + +* See [CONTRIBUTING.md](../../CONTRIBUTING.md) + +## Licensing + +* See [LICENSE](../../LICENSE) diff --git a/bigtable/api/composer.json b/bigtable/api/composer.json new file mode 100644 index 0000000000..812a578134 --- /dev/null +++ b/bigtable/api/composer.json @@ -0,0 +1,9 @@ +{ + "require": { + "google/cloud-bigtable": "^0.9.1" + }, + "require-dev": { + "google/cloud-tools": "^0.8", + "phpunit/phpunit": "^5.0" + } +} diff --git a/bigtable/api/file.txt b/bigtable/api/file.txt new file mode 100644 index 0000000000..ee193edc64 --- /dev/null +++ b/bigtable/api/file.txt @@ -0,0 +1,671 @@ +PHPUnit 5.7.27 by Sebastian Bergmann and contributors. + +Runtime: PHP 7.1.24 +Configuration: /var/www/php-docs-samples/bigtable/api/phpunit.xml.dist +Error: No code coverage driver is available + +Creating an Instance: php-instance-5c084b62b7211 +EEEEEEEEEEEEEEEE 16 / 16 (100%) + +Time: 1.81 seconds, Memory: 8.00MB + +There were 16 errors: + +1) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +2) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +3) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +4) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +5) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +6) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +7) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +8) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +9) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +10) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +11) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +12) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +13) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +14) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +15) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +16) Google\Cloud\Samples\BigTable\Tests\BigTableTest +Error: Call to undefined function Google\Protobuf\Internal\bccomp() in /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php:897 +Stack trace: +#0 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(3, Object(Google\Protobuf\Internal\FieldDescriptor)) +#1 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#2 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#3 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1116): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#4 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#5 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#6 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#7 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#8 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1004): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#9 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(815): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#10 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1137): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue(Array, Object(Google\Protobuf\Internal\FieldDescriptor)) +#11 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1086): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl(Array) +#12 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(1165): Google\Protobuf\Internal\Message->mergeFromJsonArray(Array) +#13 /var/www/php-docs-samples/bigtable/api/vendor/google/protobuf/php/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) +#14 /var/www/php-docs-samples/bigtable/api/vendor/google/gax/src/ApiCore/Transport/RestTransport.php(116): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "name": "op...') +#15 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) +#16 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) +#17 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() +#18 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() +#19 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() +#20 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) +#21 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() +#22 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() +#23 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() +#24 /var/www/php-docs-samples/bigtable/api/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() +#25 /var/www/php-docs-samples/bigtable/api/vendor/google/cloud/Bigtable/src/Admin/V2/Gapic/BigtableInstanceAdminGapicClient.php(575): GuzzleHttp\Promise\Promise->wait() +#26 /var/www/php-docs-samples/bigtable/api/src/create_production_instance.php(84): Google\Cloud\Bigtable\Admin\V2\Gapic\BigtableInstanceAdminGapicClient->createInstance('projects/grass-...', 'php-instance-5c...', Object(Google\Cloud\Bigtable\Admin\V2\Instance), Array) +#27 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(513): require('/var/www/php-do...') +#28 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(520): Google\Cloud\Samples\BigTable\Tests\BigTableTest::Google\Cloud\Samples\BigTable\Tests\{closure}() +#29 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(420): Google\Cloud\Samples\BigTable\Tests\BigTableTest::runSnippet('create_producti...', Array) +#30 /var/www/php-docs-samples/bigtable/api/test/bigtableTest.php(36): Google\Cloud\Samples\BigTable\Tests\BigTableTest::create_production_instance('grass-clump-479', 'php-instance-5c...', 'php-cluster-5c0...') +#31 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(679): Google\Cloud\Samples\BigTable\Tests\BigTableTest::setUpBeforeClass() +#32 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#33 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult)) +#34 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true) +#35 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true) +#36 /var/www/php-docs-samples/bigtable/api/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() +#37 {main} +ERRORS! +Tests: 256, Assertions: 0, Errors: 16. diff --git a/bigtable/api/phpunit.xml.dist b/bigtable/api/phpunit.xml.dist new file mode 100644 index 0000000000..0db13cb45f --- /dev/null +++ b/bigtable/api/phpunit.xml.dist @@ -0,0 +1,41 @@ + + + + + + ./test/bigtableTest.php + + + + + + + + ./src + + + \ No newline at end of file diff --git a/bigtable/api/src/create_cluster.php b/bigtable/api/src/create_cluster.php new file mode 100644 index 0000000000..b85f906727 --- /dev/null +++ b/bigtable/api/src/create_cluster.php @@ -0,0 +1,104 @@ + 5) { + return printf("Usage: php %s PROJECT_ID INSTANCE_ID CLUSTER_ID [LOCATION_ID]" . PHP_EOL, __FILE__); +} +list($_, $project_id, $instance_id, $cluster_id) = $argv; +$location_id = isset($argv[4]) ? $argv[4] : 'us-east1-b'; + +// [START bigtable_create_cluster] + +use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient; +use Google\Cloud\Bigtable\Admin\V2\Cluster; +use Google\Cloud\Bigtable\Admin\V2\StorageType; +use Google\ApiCore\ApiException; + + +/** Uncomment and populate these variables in your code */ +// $project_id = 'The Google project ID'; +// $instance_id = 'The Bigtable instance ID'; +// $cluster_id = 'The Bigtable cluster ID'; +// $location_id = 'The Bigtable region ID'; + + +$instanceAdminClient = new BigtableInstanceAdminClient(); + +$instanceName = $instanceAdminClient->instanceName($project_id, $instance_id); +$clusterName = $instanceAdminClient->clusterName($project_id, $instance_id, $cluster_id); + +printf("Adding Cluster to Instance %s" . PHP_EOL, $instance_id); +try { + $instanceAdminClient->getInstance($instanceName); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf("Instance %s does not exists." . PHP_EOL, $instance_id); + return; + } else { + throw $e; + } +} +printf("Listing Clusters:" . PHP_EOL); + +$storage_type = StorageType::SSD; +$serve_nodes = 3; + +$clustersBefore = $instanceAdminClient->listClusters($instanceName)->getClusters(); +$clusters = $clustersBefore->getIterator(); +foreach ($clusters as $cluster) { + print($cluster->getName() . PHP_EOL); +} + +$cluster = new Cluster(); +$cluster->setServeNodes($serve_nodes); +$cluster->setDefaultStorageType($storage_type); +$cluster->setLocation( + $instanceAdminClient->locationName( + $project_id, + $location_id + ) +); +try { + $instanceAdminClient->getCluster($clusterName); + printf("Cluster %s already exists, aborting...", $cluster_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $operationResponse = $instanceAdminClient->createCluster($instanceName, $cluster_id, $cluster); + + $operationResponse->pollUntilComplete(); + if ($operationResponse->operationSucceeded()) { + $result = $operationResponse->getResult(); + printf("Cluster created: %s", $cluster_id); + } else { + $error = $operationResponse->getError(); + printf("Cluster not created: %s", $error); + } + } else { + throw $e; + } +} +// [END bigtable_create_cluster] diff --git a/bigtable/api/src/create_dev_instance.php b/bigtable/api/src/create_dev_instance.php new file mode 100644 index 0000000000..aff86cb484 --- /dev/null +++ b/bigtable/api/src/create_dev_instance.php @@ -0,0 +1,106 @@ + 5) { + return printf("Usage: php %s PROJECT_ID INSTANCE_ID CLUSTER_ID [LOCATION_ID]" . PHP_EOL, __FILE__); +} +list($_, $project_id, $instance_id, $cluster_id) = $argv; +$location_id = isset($argv[4]) ? $argv[4] : 'us-east1-b'; + +// [START bigtable_create_dev_instance] + +use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient; +use Google\Cloud\Bigtable\Admin\V2\Instance; +use Google\Cloud\Bigtable\Admin\V2\Cluster; +use Google\Cloud\Bigtable\Admin\V2\StorageType; +use Google\Cloud\Bigtable\Admin\V2\Instance\Type as InstanceType; +use Google\ApiCore\ApiException; + +/** Uncomment and populate these variables in your code */ +// $project_id = 'The Google project ID'; +// $instance_id = 'The Bigtable instance ID'; +// $cluster_id = 'The Bigtable cluster ID'; +// $location_id = 'The Bigtable region ID'; + + +$instanceAdminClient = new BigtableInstanceAdminClient(); + +$projectName = $instanceAdminClient->projectName($project_id); +$instanceName = $instanceAdminClient->instanceName($project_id, $instance_id); + + +printf("Creating a DEVELOPMENT Instance" . PHP_EOL); +// Set options to create an Instance + +$storage_type = StorageType::HDD; +$development = InstanceType::DEVELOPMENT; +$labels = ['dev-label' => 'dev-label']; + + +# Create instance with given options +$instance = new Instance(); +$instance->setDisplayName($instance_id); +$instance->setLabels($labels); +$instance->setType($development); + +// Create cluster with given options +$cluster = new Cluster(); +$cluster->setDefaultStorageType($storage_type); +$cluster->setLocation( + $instanceAdminClient->locationName( + $project_id, + $location_id + ) +); +$clusters = [ + $cluster_id => $cluster +]; +// Create development instance with given options +try { + $instanceAdminClient->getInstance($instanceName); + printf("Instance %s already exists." . PHP_EOL, $instance_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf("Creating a development Instance: %s" . PHP_EOL, $instance_id); + $operationResponse = $instanceAdminClient->createInstance( + $projectName, + $instance_id, + $instance, + $clusters + ); + $operationResponse->pollUntilComplete(); + if (!$operationResponse->operationSucceeded()) { + $error = $operationResponse->getError(); + throw $error; + } else { + printf("Instance %s created.", $instance_id); + } + } else { + throw $e; + } +} +// [END bigtable_create_dev_instance] diff --git a/bigtable/api/src/create_family_gc_intersection.php b/bigtable/api/src/create_family_gc_intersection.php new file mode 100644 index 0000000000..23b9a9b686 --- /dev/null +++ b/bigtable/api/src/create_family_gc_intersection.php @@ -0,0 +1,74 @@ +tableName($project_id, $instance_id, $table_id); + +print('Creating column family cf4 with Intersection GC rule...' . PHP_EOL); +$columnFamily4 = new ColumnFamily(); + +$intersection_rule = new GcRuleIntersection(); +$intersection_array = [ + (new GcRule)->setMaxAge((new Duration())->setSeconds(3600 * 24 * 5)), + (new GcRule)->setMaxNumVersions(2) +]; +$intersection_rule->setRules($intersection_array); + +$intersection = new GcRule(); +$intersection->setIntersection($intersection_rule); + +$columnFamily4->setGCRule($intersection); + +$columnModification = new Modification(); +$columnModification->setId('cf4'); +$columnModification->setCreate($columnFamily4); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); + +print('Created column family cf4 with Union GC rule' . PHP_EOL); + +// [END bigtable_create_family_gc_intersection] diff --git a/bigtable/api/src/create_family_gc_max_age.php b/bigtable/api/src/create_family_gc_max_age.php new file mode 100644 index 0000000000..050c2dcfd6 --- /dev/null +++ b/bigtable/api/src/create_family_gc_max_age.php @@ -0,0 +1,69 @@ +tableName($project_id, $instance_id, $table_id); + + +print('Creating column family cf1 with MaxAge GC Rule...' . PHP_EOL); +// Create a column family with GC policy : maximum age +// where age = current time minus cell timestamp + +$columnFamily1 = new ColumnFamily(); +$duration = new Duration(); +$duration->setSeconds(3600 * 24 * 5); +$MaxAgeRule = (new GcRule)->setMaxAge($duration); +$columnFamily1->setGcRule($MaxAgeRule); + +$columnModification = new Modification(); +$columnModification->setId('cf1'); +$columnModification->setCreate($columnFamily1); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); +print('Created column family cf1 with MaxAge GC Rule.' . PHP_EOL); + +// [END bigtable_create_family_gc_max_age] \ No newline at end of file diff --git a/bigtable/api/src/create_family_gc_max_versions.php b/bigtable/api/src/create_family_gc_max_versions.php new file mode 100644 index 0000000000..29a43b206d --- /dev/null +++ b/bigtable/api/src/create_family_gc_max_versions.php @@ -0,0 +1,64 @@ +tableName($project_id, $instance_id, $table_id); + + +print('Creating column family cf2 with max versions GC rule...' . PHP_EOL); +$columnFamily2 = new ColumnFamily(); +$maxVersionRule = (new GcRule)->setMaxNumVersions(2); +$columnFamily2->setGCRule($maxVersionRule); + +$columnModification = new Modification(); +$columnModification->setId('cf2'); +$columnModification->setCreate($columnFamily2); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); + +print('Created column family cf2 with Max Versions GC Rule.' . PHP_EOL); + +// [END bigtable_create_family_gc_max_versions] \ No newline at end of file diff --git a/bigtable/api/src/create_family_gc_nested.php b/bigtable/api/src/create_family_gc_nested.php new file mode 100644 index 0000000000..e50147042d --- /dev/null +++ b/bigtable/api/src/create_family_gc_nested.php @@ -0,0 +1,92 @@ +tableName($project_id, $instance_id, $table_id); + + +print('Creating column family cf5 with a Nested GC rule...' . PHP_EOL); +// Create a column family with nested GC policies. +// Create a nested GC rule: +// Drop cells that are either older than the 10 recent versions +// OR +// Drop cells that are older than a month AND older than the +// 2 recent versions +$columnFamily5 = new ColumnFamily(); +$rule1 = (new GcRule)->setMaxNumVersions(10); + +$rule2Intersection = new GcRuleIntersection(); +$rule2Duration1 = new Duration(); +$rule2Duration1->setSeconds(3600 * 24 * 30); +$rule2Array = [ + (new GcRule)->setMaxAge($rule2Duration1), + (new GcRule)->setMaxNumVersions(2) +]; +$rule2Intersection->setRules($rule2Array); +$rule2 = new GcRule(); +$rule2->setIntersection($rule2Intersection); + +$nested_rule = new GcRuleUnion(); +$nested_rule->setRules([ + $rule1, + $rule2 +]); +$nested_rule = (new GcRule())->setUnion($nested_rule); + +$columnFamily5->setGCRule($nested_rule); + +$columnModification = new Modification(); +$columnModification->setId('cf5'); +$columnModification->setCreate($columnFamily5); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); + +print('Created column family cf5 with a Nested GC rule.' . PHP_EOL); + +// [END bigtable_create_family_gc_nested] \ No newline at end of file diff --git a/bigtable/api/src/create_family_gc_union.php b/bigtable/api/src/create_family_gc_union.php new file mode 100644 index 0000000000..de7b7356be --- /dev/null +++ b/bigtable/api/src/create_family_gc_union.php @@ -0,0 +1,81 @@ +tableName($project_id, $instance_id, $table_id); + + +print('Creating column family cf3 with union GC rule...' . PHP_EOL); +// Create a column family with GC policy to drop data that matches +// at least one condition. +// Define a GC rule to drop cells older than 5 days or not the +// most recent version + + +$columnFamily3 = new ColumnFamily(); + +$rule_union = new GcRuleUnion(); +$rule_union_array = [ + (new GcRule)->setMaxNumVersions(2), + (new GcRule)->setMaxAge((new Duration())->setSeconds(3600 * 24 * 5)) +]; +$rule_union->setRules($rule_union_array); +$union = new GcRule(); +$union->setUnion($rule_union); + +$columnFamily3->setGCRule($union); + +$columnModification = new Modification(); +$columnModification->setId('cf3'); +$columnModification->setCreate($columnFamily3); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); + +print('Created column family cf3 with Union GC rule.' . PHP_EOL); + +// [END bigtable_create_family_gc_union] \ No newline at end of file diff --git a/bigtable/api/src/create_production_instance.php b/bigtable/api/src/create_production_instance.php new file mode 100644 index 0000000000..d080188fa8 --- /dev/null +++ b/bigtable/api/src/create_production_instance.php @@ -0,0 +1,97 @@ + 4) { + return printf("Usage: php %s PROJECT_ID INSTANCE_ID CLUSTER_ID [LOCATION_ID]" . PHP_EOL, __FILE__); +} +list($_, $project_id, $instance_id, $cluster_id) = $argv; +$location_id = isset($argv[4]) ? $argv[4] : 'us-east1-b'; + +// [START bigtable_create_prod_instance] + +use Google\Cloud\Bigtable\Admin\V2\Instance\Type as InstanceType; +use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient; +use Google\Cloud\Bigtable\Admin\V2\StorageType; +use Google\Cloud\Bigtable\Admin\V2\Instance; +use Google\Cloud\Bigtable\Admin\V2\Cluster; +use Google\ApiCore\ApiException; + +/** Uncomment and populate these variables in your code */ +// $project_id = 'The Google project ID'; +// $instance_id = 'The Bigtable instance ID'; +// $cluster_id = 'The Bigtable table ID'; +// $location_id = 'The Bigtable region ID'; + +$instanceAdminClient = new BigtableInstanceAdminClient(); + +$projectName = $instanceAdminClient->projectName($project_id); +$instanceName = $instanceAdminClient->instanceName($project_id, $instance_id); + +$serve_nodes = 3; +$storage_type = StorageType::SSD; +$production = InstanceType::PRODUCTION; +$labels = ['prod-label' => 'prod-label']; + +$instance = new Instance(); +$instance->setDisplayName($instance_id); + +$instance->setLabels($labels); +$instance->setType($production); + +$cluster = new Cluster(); +$cluster->setDefaultStorageType($storage_type); +$locationName = $instanceAdminClient->locationName($project_id, $location_id); +$cluster->setLocation($locationName); +$cluster->setServeNodes($serve_nodes); +$clusters = [ + $cluster_id => $cluster +]; +try { + $instanceAdminClient->getInstance($instanceName); + printf("Instance %s already exists." . PHP_EOL, $instance_id); + throw new Exception(sprintf("Instance %s already exists." . PHP_EOL, $instance_id)); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf("Creating an Instance: %s" . PHP_EOL, $instance_id); + $operationResponse = $instanceAdminClient->createInstance( + $projectName, + $instance_id, + $instance, + $clusters + ); + $operationResponse->pollUntilComplete(); + if (!$operationResponse->operationSucceeded()) { + $error = $operationResponse->getError(); + throw $error; + } else { + printf("Instance %s created.", $instance_id); + } + } else { + throw $e; + } +} +// [END bigtable_create_prod_instance] diff --git a/bigtable/api/src/create_table.php b/bigtable/api/src/create_table.php new file mode 100644 index 0000000000..0775930a79 --- /dev/null +++ b/bigtable/api/src/create_table.php @@ -0,0 +1,75 @@ +instanceName($project_id, $instance_id); +$tableName = $tableAdminClient->tableName($project_id, $instance_id, $table_id); + +// Check whether table exists in an instance. +// Create table if it does not exists. +$table = new Table(); +printf('Creating a Table : %s' . PHP_EOL, $table_id); + +try { + $tableAdminClient->getTable($tableName, ['view' => View::NAME_ONLY]); + printf('Table %s alredy exists' . PHP_EOL, $table_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf('Creating the %s table' . PHP_EOL, $table_id); + + $tableAdminClient->createtable( + $instanceName, + $table_id, + $table + ); + printf('Created table %s' . PHP_EOL, $table_id); + } else { + throw $e; + } +} +// [END bigtable_create_table] \ No newline at end of file diff --git a/bigtable/api/src/delete_cluster.php b/bigtable/api/src/delete_cluster.php new file mode 100644 index 0000000000..2adfe63e8f --- /dev/null +++ b/bigtable/api/src/delete_cluster.php @@ -0,0 +1,60 @@ +clusterName($project_id, $instance_id, $cluster_id); + + +printf("Deleting Cluster" . PHP_EOL); +try { + $instanceAdminClient->deleteCluster($clusterName); + printf("Cluster %s deleted." . PHP_EOL, $cluster_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf("Cluster %s does not exist." . PHP_EOL, $cluster_id); + } else { + throw $e; + } +} +// [END bigtable_delete_cluster] diff --git a/bigtable/api/src/delete_family.php b/bigtable/api/src/delete_family.php new file mode 100644 index 0000000000..dbd9cab007 --- /dev/null +++ b/bigtable/api/src/delete_family.php @@ -0,0 +1,59 @@ +tableName($project_id, $instance_id, $table_id); + + +print('Delete a column family cf2...' . PHP_EOL); +// Delete a column family +$columnModification = new Modification(); +$columnModification->setId($family_id); +$columnModification->setDrop(true); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); +print('Column family cf2 deleted successfully.' . PHP_EOL); +// [END bigtable_delete_family] diff --git a/bigtable/api/src/delete_instance.php b/bigtable/api/src/delete_instance.php new file mode 100644 index 0000000000..126e86acdc --- /dev/null +++ b/bigtable/api/src/delete_instance.php @@ -0,0 +1,60 @@ +instanceName($project_id, $instance_id); + + +// [START bigtable_delete_instance] +printf("Deleting Instance" . PHP_EOL); +try { + $instanceAdminClient->deleteInstance($instanceName); + printf("Deleted Instance: %s." . PHP_EOL, $instance_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf("Instance %s does not exists." . PHP_EOL, $instance_id); + } else { + throw $e; + } +} +// [END bigtable_delete_instance] + + diff --git a/bigtable/api/src/delete_table.php b/bigtable/api/src/delete_table.php new file mode 100644 index 0000000000..063b1d3ee1 --- /dev/null +++ b/bigtable/api/src/delete_table.php @@ -0,0 +1,60 @@ +tableName($project_id, $instance_id, $table_id); + +// Delete the entire table + +try { + printf('Attempting to delete table %s.' . PHP_EOL, $table_id); + $tableAdminClient->deleteTable($tableName); + printf('Deleted %s table.' . PHP_EOL, $table_id); +} catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + printf('Table %s does not exists' . PHP_EOL, $table_id); + } else { + throw $e; + } +} +// [END bigtable_delete_table] diff --git a/bigtable/api/src/list_column_families.php b/bigtable/api/src/list_column_families.php new file mode 100644 index 0000000000..e97af3950a --- /dev/null +++ b/bigtable/api/src/list_column_families.php @@ -0,0 +1,56 @@ +tableName($project_id, $instance_id, $table_id); + + +$table = $tableAdminClient->getTable($tableName); +$columnFamilies = $table->getColumnFamilies()->getIterator(); + +foreach ($columnFamilies as $k => $columnFamily) { + printf('Column Family: %s' . PHP_EOL, $k); + print('GC Rule:' . PHP_EOL); + printf('%s' . PHP_EOL, $columnFamily->serializeToJsonString()); +} +// [END bigtable_list_column_families] \ No newline at end of file diff --git a/bigtable/api/src/list_instance.php b/bigtable/api/src/list_instance.php new file mode 100644 index 0000000000..83feb93561 --- /dev/null +++ b/bigtable/api/src/list_instance.php @@ -0,0 +1,54 @@ +projectName($project_id); + +printf("Listing Instances:" . PHP_EOL); + +$getInstances = $instanceAdminClient->listInstances($projectName)->getInstances(); +$instances = $getInstances->getIterator(); + +foreach ($instances as $instance) { + print($instance->getDisplayName() . PHP_EOL); +} + +// [END bigtable_list_instances] \ No newline at end of file diff --git a/bigtable/api/src/list_instance_clusters.php b/bigtable/api/src/list_instance_clusters.php new file mode 100644 index 0000000000..e741c52d60 --- /dev/null +++ b/bigtable/api/src/list_instance_clusters.php @@ -0,0 +1,54 @@ +projectName($project_id); +$instanceName = $instanceAdminClient->instanceName($project_id, $instance_id); + + +printf("Listing Clusters:" . PHP_EOL); +$getClusters = $instanceAdminClient->listClusters($instanceName)->getClusters(); +$clusters = $getClusters->getIterator(); + +foreach ($clusters as $cluster) { + print($cluster->getName() . PHP_EOL); +} +// [END bigtable_get_clusters] \ No newline at end of file diff --git a/bigtable/api/src/list_tables.php b/bigtable/api/src/list_tables.php new file mode 100644 index 0000000000..b9a828619b --- /dev/null +++ b/bigtable/api/src/list_tables.php @@ -0,0 +1,56 @@ +instanceName($project_id, $instance_id); + +printf("Listing Tables:" . PHP_EOL); +$tables = $tableAdminClient->listTables($instanceName)->iterateAllElements(); +if(empty($tables)){ + print('No table exists.' . PHP_EOL); + exit(0); +} +foreach ($tables as $table) { + print($table->getName() . PHP_EOL); +} +// [END bigtable_list_tables] diff --git a/bigtable/api/src/update_gc_rule.php b/bigtable/api/src/update_gc_rule.php new file mode 100644 index 0000000000..419dbf7c7b --- /dev/null +++ b/bigtable/api/src/update_gc_rule.php @@ -0,0 +1,65 @@ + 5) { + return printf("Usage: php %s PROJECT_ID INSTANCE_ID TABLE_ID [FAMILY_ID]" . PHP_EOL, __FILE__); +} +list($_, $project_id, $instance_id, $table_id) = $argv; +$family_id = isset($argv[4]) ? $argv[4] : 'cf3'; + +// [START bigtable_update_gc_rule] + +use Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification; +use Google\Cloud\Bigtable\Admin\V2\BigtableInstanceAdminClient; +use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient; +use Google\Cloud\Bigtable\Admin\V2\ColumnFamily; +use Google\Cloud\Bigtable\Admin\V2\GcRule; + + +/** Uncomment and populate these variables in your code */ +// $project_id = 'The Google project ID'; +// $instance_id = 'The Bigtable instance ID'; +// $table_id = 'The Bigtable table ID'; +// $location_id = 'The Bigtable region ID'; + +$tableAdminClient = new BigtableTableAdminClient(); + +$tableName = $tableAdminClient->tableName($project_id, $instance_id, $table_id); + +$columnFamily1 = new ColumnFamily(); +print('Updating column family cf3 GC rule...' . PHP_EOL); +$columnFamily1->setGcRule((new GcRule)->setMaxNumVersions(1)); +// Update the column family cf1 to update the GC rule +$columnModification = new Modification(); +$columnModification->setId('cf3'); +$columnModification->setUpdate($columnFamily1); +$tableAdminClient->modifyColumnFamilies($tableName, [$columnModification]); + +print('Print column family cf3 GC rule after update...' . PHP_EOL); +printf('Column Family: cf3'); +printf('%s' . PHP_EOL, $columnFamily1->serializeToJsonString()); +// [END bigtable_update_gc_rule] \ No newline at end of file diff --git a/bigtable/api/test/bigtableTest.php b/bigtable/api/test/bigtableTest.php new file mode 100644 index 0000000000..4c5ea4a747 --- /dev/null +++ b/bigtable/api/test/bigtableTest.php @@ -0,0 +1,493 @@ +useResourceExhaustedBackoff(); + } + + public function testCreateAndDeleteCluster() + { + $clusterId = uniqid(self::CLUSTER_ID_PREFIX); + + $content = self::runSnippet('create_cluster', [ + self::$projectId, + self::$instanceId, + $clusterId, + 'us-east1-c' + ]); + $array = explode(PHP_EOL, $content); + + $clusterName = self::$instanceAdminClient->clusterName(self::$projectId, self::$instanceId, $clusterId); + + $this->checkCluster($clusterName); + + $content = self::runSnippet('delete_cluster', [ + self::$projectId, + self::$instanceId, + $clusterId + ]); + + try { + self::$instanceAdminClient->getCluster($clusterName); + $this->fail(sprintf('Cluster %s still exists', $cluster->getName())); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $this->assertTrue(true); + } + } + } + + public function testCreateDevInstance() + { + $instanceId = uniqid(self::INSTANCE_ID_PREFIX); + $clusterId = uniqid(self::CLUSTER_ID_PREFIX); + + $content = self::runSnippet('create_dev_instance', [ + self::$projectId, + $instanceId, + $clusterId + ]); + $array = explode(PHP_EOL, $content); + + $instanceName = self::$instanceAdminClient->instanceName(self::$projectId, $instanceId); + + $this->checkInstance($instanceName); + $this->cleanInstance(self::$projectId, $instanceId); + } + + public function testCreateProductionInstance() + { + $instanceId = uniqid(self::INSTANCE_ID_PREFIX); + $clusterId = uniqid(self::CLUSTER_ID_PREFIX); + + $content = self::runSnippet('create_production_instance', [ + self::$projectId, + $instanceId, + $clusterId + ]); + + $instanceName = self::$instanceAdminClient->instanceName(self::$projectId, $instanceId); + + $this->checkInstance($instanceName); + $this->cleanInstance(self::$projectId, $instanceId); + } + + public function testListInstances() + { + $content = self::runSnippet('list_instance', [ + self::$projectId, + self::$instanceId + ]); + + $array = explode(PHP_EOL, $content); + + $this->assertContains('Listing Instances:', $array); + $this->assertContains(self::$instanceId, $array); + } + + public function testListTable() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('list_tables', [ + self::$projectId, + self::$instanceId + ]); + $array = explode(PHP_EOL, $content); + + $this->assertContains('Listing Tables:', $array); + $this->assertContains('projects/' . self::$projectId . '/instances/' . self::$instanceId . '/tables/' . $tableId, $array); + } + + public function testListColumnFamilies() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + self::runSnippet('create_family_gc_union', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $content = self::runSnippet('list_column_families', [ + self::$projectId, + self::$instanceId, + $tableId, + ]); + + $array = explode(PHP_EOL, $content); + + $this->assertContains(sprintf('Column Family: %s', 'cf3'), $array); + $this->assertContains('GC Rule:', $array); + $this->assertContains('{"gcRule":{"union":{"rules":[{"maxNumVersions":2},{"maxAge":"432000.000000000s"}]}}}', $array); + } + + public function testListInstanceClusters() + { + $content = self::runSnippet('list_instance_clusters', [ + self::$projectId, + self::$instanceId + ]); + + $array = explode(PHP_EOL, $content); + + $this->assertContains('Listing Clusters:', $array); + $this->assertContains('projects/' . self::$projectId . '/instances/' . self::$instanceId . '/clusters/' . self::$clusterId, $array); + } + + public function testcreate_table() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + self::runSnippet('create_table', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $this->checkTable($tableName); + } + + public function testCreateFamilyGcUnion() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('create_family_gc_union', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $gcRuleCompare = [ + 'gcRule' => [ + 'union' => [ + 'rules' => [ + [ + 'maxNumVersions' => 2 + ], + [ + 'maxAge' => '432000.000000000s' + ] + ] + ] + ] + ]; + + $this->checkRule($tableName, 'cf3', $gcRuleCompare); + } + + public function testCreateFamilyGcNested() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('create_family_gc_nested', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $gcRuleCompare = [ + 'gcRule' => [ + 'union' => [ + 'rules' => [ + [ + 'maxNumVersions' => 10 + ], + [ + 'intersection' => [ + 'rules' => [ + [ + 'maxAge' => '2592000.000000000s' + ], + [ + 'maxNumVersions' => 2 + ] + ] + ] + ] + ] + ] + ] + ]; + + $this->checkRule($tableName, 'cf5', $gcRuleCompare); + } + + public function testCreateFamilyGcMaxVersions() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('create_family_gc_max_versions', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $gcRuleCompare = [ + 'gcRule' => [ + 'maxNumVersions' => 2 + ] + ]; + + $this->checkRule($tableName, 'cf2', $gcRuleCompare); + } + + public function testCreateFamilyGcMaxAge() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('create_family_gc_max_age', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $gcRuleCompare = [ + 'gcRule' => [ + 'maxAge' => '432000.000000000s' + ] + ]; + + $this->checkRule($tableName, 'cf1', $gcRuleCompare); + } + + public function testCreateFamilyGcIntersection() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + + $content = self::runSnippet('create_family_gc_intersection', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $gcRuleCompare = [ + 'gcRule' => [ + 'intersection' => [ + 'rules' => [ + [ + 'maxAge' => '432000.000000000s' + ], + [ + 'maxNumVersions' => 2 + ] + ] + ] + ] + ]; + + $this->checkRule($tableName, 'cf4', $gcRuleCompare); + } + + public function testDeleteTable() + { + $tableId = uniqid(self::TABLE_ID_PREFIX); + $tableName = self::$tableAdminClient->tableName(self::$projectId, self::$instanceId, $tableId); + + $this->createTable(self::$projectId, self::$instanceId, self::$clusterId, $tableId); + $this->checkTable($tableName); + + $content = self::runSnippet('delete_table', [ + self::$projectId, + self::$instanceId, + $tableId + ]); + + try { + $table = self::$tableAdminClient->getTable($tableName, ['view' => View::NAME_ONLY]); + $this->fail(sprintf('Instance %s still exists', $table->getName())); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $this->assertTrue(true); + } + } + } + + private static function create_production_instance($projectId, $instanceId, $clusterId) + { + $content = self::runSnippet('create_production_instance', [ + $projectId, + $instanceId, + $clusterId + ]); + } + + public function testDeleteInstance() + { + $instanceName = self::$instanceAdminClient->instanceName(self::$projectId, self::$instanceId); + + $content = self::runSnippet('delete_instance', [ + self::$projectId, + self::$instanceId + ]); + + try { + $instance = self::$instanceAdminClient->getInstance($instanceName); + $this->fail(sprintf('Instance %s still exists', $instance->getName())); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $this->assertTrue(true); + } + } + } + + private function checkCluster($clusterName) + { + try { + $cluster = self::$instanceAdminClient->getCluster($clusterName); + $this->assertEquals($cluster->getName(), $clusterName); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $error = json_decode($e->getMessage(), true); + $this->fail($error['message']); + } else { + throw $e; + } + } + } + + private function checkRule($tableName, $familyKey, $gcRuleCompare) + { + try { + $table = self::$tableAdminClient->getTable($tableName); + $columnFamilies = $table->getColumnFamilies()->getIterator(); + $key = $columnFamilies->key(); + $json = $columnFamilies->current()->serializeToJsonString(); + + $gcRule = json_decode($columnFamilies->current()->serializeToJsonString(), true); + + $this->assertEquals($key, $familyKey); + $this->assertEquals($gcRule, $gcRuleCompare); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $error = json_decode($e->getMessage(), true); + $this->fail($error['message']); + } else { + throw $e; + } + } + } + + private function checkInstance($instanceName) + { + try { + $instance = self::$instanceAdminClient->getInstance($instanceName); + $this->assertEquals($instance->getName(), $instanceName); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $error = json_decode($e->getMessage(), true); + $this->fail($error['message']); + } else { + throw $e; + } + } + } + + private function checkTable($tableName) + { + try { + $table = self::$tableAdminClient->getTable($tableName); + $this->assertEquals($table->getName(), $tableName); + } catch (ApiException $e) { + if ($e->getStatus() === 'NOT_FOUND') { + $error = json_decode($e->getMessage(), true); + $this->fail($error['message']); + } else { + throw $e; + } + } + } + + private function createTable($projectId, $instanceId, $clusterId, $tableId) + { + self::runSnippet('create_table', [ + $projectId, + $instanceId, + $tableId + ]); + } + + private function cleanInstance($projectId, $instanceId) + { + $content = self::runSnippet('delete_instance', [ + $projectId, + $instanceId + ]); + } + + private static function runSnippet($sampleName, $params = []) + { + $testFunc = function() use ($sampleName, $params) { + $argv = array_merge([basename(__FILE__)], $params); + ob_start(); + require __DIR__ . "/../src/$sampleName.php"; + return ob_get_clean(); + }; + + if (self::$backoff) { + return self::$backoff->execute($testFunc); + } + + return $testFunc(); + } +} diff --git a/testing/run_test_suite.sh b/testing/run_test_suite.sh index a11b9d6b5d..0d5e108ef3 100755 --- a/testing/run_test_suite.sh +++ b/testing/run_test_suite.sh @@ -41,6 +41,7 @@ ALT_PROJECT_TESTS=( bigquery/api datastore/api datastore/tutorial + bigtable/api dialogflow dlp error_reporting