Code Monkey home page Code Monkey logo

googlecloudplatform / java-docs-samples Goto Github PK

View Code? Open in Web Editor NEW
1.7K 209.0 2.8K 99.47 MB

Java and Kotlin Code samples used on cloud.google.com

Home Page: https://cloud.google.com/java

License: Apache License 2.0

Java 93.55% XSLT 0.01% HTML 0.64% CSS 0.03% Shell 0.59% Python 0.01% JavaScript 4.57% Batchfile 0.02% Dockerfile 0.20% Kotlin 0.07% Groovy 0.03% Scala 0.17% HCL 0.09% Makefile 0.01%
java kotlin appengine auth automl cdn vision video translate samples

java-docs-samples's Introduction

Google Cloud Platform Java Samples

Build Status Build Status Build Status

Open in Cloud Shell

This repository holds sample code written in Java that demonstrates the Google Cloud Platform.

Some samples have accompanying guides on <cloud.google.com>. See respective README files for details.

Google Cloud Samples

To browse ready to use code samples check Google Cloud Samples.

Set Up

  1. Set up your Java Development Environment

  2. Clone this repository:

     git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
    
  3. Obtain authentication credentials.

    Create local credentials by running the following command and following the oauth2 flow (read more about the command here):

     gcloud auth application-default login
    

    Or manually set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to a service account key JSON file path.

    Learn more at Setting Up Authentication for Server to Server Production Applications.

    Note: Application Default Credentials is able to implicitly find the credentials as long as the application is running on Compute Engine, Kubernetes Engine, App Engine, or Cloud Functions.

Contributing

Licensing

Supported Java runtimes

Every submitted change has to pass all checks that run on the testing environments with Java 11 and Java 17 runtimes before merging the change to the main branch. We run periodic checks on the environments with Java 8 and Java 21 runtimes but we don't enforce passing these tests at the moment. Because Java 8 is a supported Java runtime in Google Cloud, please configure to build your code sample with Java 8. In exceptional cases, configure to build your code sample using Java 11.

Source Code Headers

Every file containing source code must include copyright and license information. This includes any JS/CSS files that you might be serving out to browsers. (This is to help well-intentioned people avoid accidental copying that doesn't comply with the license.)

Apache header:

Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Java is a registered trademark of Oracle and/or its affiliates.

java-docs-samples's People

Contributors

anguillanneuf avatar averikitsch avatar bhavika-dhanwani avatar billyjacobson avatar chingor13 avatar dpebot avatar dzlier-gcp avatar frankyn avatar gericdong avatar gguuss avatar irataxy avatar jabubake avatar jerjou avatar jmdobry avatar kolea2 avatar kurtisvg avatar kweinmeister avatar lesv avatar munkhuushmgl avatar nnegrey avatar noerog avatar olavloite avatar puneithk avatar release-please[bot] avatar renovate-bot avatar shabirmean avatar shubha-rajan avatar sita04 avatar tswast avatar zhumin8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-docs-samples's Issues

FR: env flex & new Plugins - Todo list

  • flexible/async-rest - shouldnโ€™t be using Docker
  • flexible/endpoints - does appengine:deploy work?
  • flexible/* - See if we really want to use EnvVarโ€™s to pass values,
    perhaps we should modify to use web.xml context vars.
  • flexible/memcache โ€” NEED WORK

Time passed to startTimeOfDay must be UTC

Sample code from AwsRequester.java inaccurately prescribes Pacific Date/Time values here:

/**
 * Specify times below using US Pacific Time Zone.
 */
private static final String START_DATE = "YYYY-MM-DD";
private static final String START_TIME = "HH:MM:SS";

This bit us when setting up a transfer job recently. Browsing the Schedule source you can see UTC should be passed:

/**
 * The time in UTC at which the transfer will be scheduled to start in a day. Transfers may start
 * later than this time. If not specified, transfers are scheduled to start at midnight UTC.
 * @param startTimeOfDay startTimeOfDay or {@code null} for none
 */
public Schedule setStartTimeOfDay(TimeOfDay startTimeOfDay)

Datastore 500 errors still cause frequent test flakes

We often get errors like these, which are not caused by the way we are using Datastore, but the fact that Datastore calls can occasionally fail.

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.792 sec <<< FAILURE! - in com.google.appengine.sparkdemo.UserControllerTest
com.google.appengine.sparkdemo.UserControllerTest  Time elapsed: 0.792 sec  <<< ERROR!
com.google.gcloud.datastore.DatastoreException: 
Backend Error

I think ideally we would use the local emulator for Datastore unit tests, as this makes the tests faster and more hermetic.

It would also be nice for our tracking to have an "integration test" which does make the real call. We can ignore failures caused by the system, but would be good to track how often they fail versus pass.

Speech sample build error

Build error is
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/google/cloud/shared-configuration/1.0.0/shared-configuration-1.0.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.google.cloud.speech:grpc-sample:1.0: Could not transfer artifact com.google.cloud:shared-configuration:pom:1.0.0 from/to central (https://repo.maven.apache.org/maven2): connect timed out and 'parent.relativePath' points at wrong local POM @ line 29, column 11

I think
~ on pom.xml doesn't indicate the effective url.
shared-configuration and ../../java-repo-tools don't exist.

Can't compile datastore sample with jdk 1.7

To successfully compile from the datastore/ folder, in java-docs-samples/datastore/pom.xml, I needed to change the source and target to use 1.7 (they are set up for 1.8).

"Received EOS on DATA" frame after around 1 minute running

I setup a demo of the Google Cloud Speech API running on Android with AudioRecord to retrieve audio from the microphone.
Its working but after a while (+/- 1 minute) the channel closes by itself.
I basically used the java StreamRecognizeClient example, including the last changes to the gRPC 1.0 and the ManagedChannelBuilder
There is a definition to set a timeout or am I doing something wrong here?

Here is the main code setup:

Setup channel

private static final List<String> OAUTH2_SCOPES = Arrays.asList("https://www.googleapis.com/auth/cloud-platform");

    public static ManagedChannel createChannel(InputStream authorizationFile, String host, int port) throws IOException {

        GoogleCredentials creds = GoogleCredentials.fromStream(authorizationFile);
        creds = creds.createScoped(OAUTH2_SCOPES);
        ManagedChannel channel =
                ManagedChannelBuilder.forAddress(host, port)
                        .intercept(new ClientAuthInterceptor(creds, Executors.newSingleThreadExecutor()))
                        .build();

        return channel;
    }

Recognize setup and loop

public void recognize() throws InterruptedException, IOException {

        try {
            // Build and send a StreamingRecognizeRequest containing the parameters for
            // processing the audio.
            RecognitionConfig config =
                    RecognitionConfig.newBuilder()
                            .setEncoding(RecognitionConfig.AudioEncoding.LINEAR16)
                            .setSampleRate(this.RECORDER_SAMPLERATE)
                            //.setLanguageCode("en-US")
                            .build();

            // Sreaming config
            StreamingRecognitionConfig streamingConfig =
                    StreamingRecognitionConfig.newBuilder()
                            .setConfig(config)
                            .setInterimResults(true)
                            .setSingleUtterance(false)
                            .build();
            // First request
            StreamingRecognizeRequest initial =
                    StreamingRecognizeRequest.newBuilder().setStreamingConfig(streamingConfig).build();

            requestObserver.onNext(initial);

            // Microphone listener and recorder
            recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
                    this.RECORDER_SAMPLERATE,
                    this.RECORDER_CHANNELS,
                    this.RECORDER_AUDIO_ENCODING,
                    bufferSize);

            recorder.startRecording();

            byte[] buffer = new byte[bufferSize];
            int recordState;

            // loop through the audio samplings
            while ( (recordState = recorder.read(buffer, 0, buffer.length) ) > -1 ) {

                // skip if there is no data
                if( recordState < 0 )
                    continue;

                // create a new recognition request
                StreamingRecognizeRequest request =
                        StreamingRecognizeRequest.newBuilder()
                                .setAudioContent(ByteString.copyFrom(buffer, 0, buffer.length))
                                .build();

                // put it on the works
                requestObserver.onNext(request);
            }

        } catch (RuntimeException e) {
            // Cancel RPC.
            requestObserver.onError(e);
            throw e;
        }
        // Mark the end of requests.
        requestObserver.onCompleted();
    }

The full code is in this repo: https://github.com/Cloudoki/android-google-cloud-speech-api

Need some help here, because I'm not figuring it out!

Thanks

FR: More testing for Multitenancy

Also, needs to have more README and make some functions in both UpdateCountServlet and MultitenancyServlet actually useful and runnable.

Google Cloud Speech + App engine using java white listed gRPC channel builder

I am building java based google cloud speech streaming recognize service app in app engine so different applications consuming this service will send browser recording microphone streaming audio as PCM chunks to get response transcript and it works fine in standalone using socket.io (StreamingRecognize.java) when we create` servlet, Google channel API with the mashup code from StreamingRecognize.java and we deploy in app engine it throws white listed error while getting gRPC connection build in ManagedChannel.

Is GAE have accessibility to run gRPC client with HTTP2 support?

@OverRide
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
GoogleCredentials creds = GoogleCredentials.getApplicationDefault();
creds = creds.createScoped(OAUTH2_SCOPES);
ManagedChannel channel = ManagedChannelBuilder
.forAddress("speech.googleapis.com", 443)
.intercept(new ClientAuthInterceptor(creds, Executors.newSingleThreadExecutor()))
.build();
.....

image

Clean up Monitoring V3 sample.

Some minor edits needed for javadocs, also using Truth for some of the assertions would really help in the tests. See PR #116.

  • checkstyle needs to pass on the test classes. Fixed by #122.
  • use Truth for assertions in tests. Fixed by #122.
  • enable tests by default, so that they run in Travis. (Depends on whitelisting the cloud-samples-tests project.)
  • adjust line breaks to follow "the rectangle rule".
  • <p> tags in recommended line in javadocs.
  • make license headers regular comment, not javadocs.

Make sure Travis passes for non-branch pull requests

I did pull out integration tests already for the cloud-vision repository (though more work is needed GoogleCloudPlatform/cloud-vision#50). It means that Travis can at least run the unit tests for pull requests from other repos, skipping the integration tests.

  • Ignore decryption failure.
  • Run build without the tests. `mvn verify -DskipTests=true
  • Pull out integration tests (that need service account) and run all but those.

Travis is blocking Gradle apt source

From https://travis-ci.org/GoogleCloudPlatform/java-docs-samples/builds/166859196#L129

Adding APT Sources (BETA)
Disallowing sources: \{:sourceline\=\>"ppa:cwchien/gradle"\}
If you require these sources, please review the source approval process at: https://github.com/travis-ci/apt-source-whitelist#source-approval-process
$ export DEBIAN_FRONTEND=noninteractive
0.13s$ curl -sSL "https://ftp-master.debian.org/keys/archive-key-7.0.asc" | sudo -E apt-key add -
OK
0.01s$ echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list > /dev/null
Installing APT Packages (BETA)
Disallowing packages: gradle-3.0
If you require these packages, please review the package approval process at: https://github.com/travis-ci/apt-package-whitelist#package-approval-process
$ export DEBIAN_FRONTEND=noninteractive
9.05s$ sudo -E apt-get -yq update &>> ~/apt-get-update.log
14.33s$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install expect shellcheck

I'm not sure if we need this anymore or not. Maybe the Java Travis image comes with Gradle now?

Error:Execution failed for task ':app:generateDebugProto'.

i test the google cloud speech api in android studio. after i set the gradle,protobuf, and i compiling the project ,i got the problem like blow:

Error:Execution failed for task ':app:generateDebugProto'.

protoc: stdout: . stderr: D:\Android\A1\GoogleSpeech\app\build\extracted-protos\main: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\src\debug\proto: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\build\extracted-protos\debug: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\build\extracted-include-protos\debug: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\src\debug\proto: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\build\extracted-protos\debug: warning: directory does not exist.
D:\Android\A1\GoogleSpeech\app\build\extracted-include-protos\debug: warning: directory does not exist.
[libprotobuf WARNING google/protobuf/descriptor.cc:6117] Warning: Unused import: "google/logging/v2/logging.proto" imports "google/rpc/status.proto" which is not used.
[libprotobuf WARNING google/protobuf/descriptor.cc:6117] Warning: Unused import: "google/logging/v2/logging_config.proto" imports "google/protobuf/timestamp.proto" which is not used.
--java_out: google/api/annotations.proto: Unknown generator option: lite

Some samples do not pass checkstyle

compute/error-reporting did not have the parent pom defined.

Example: ExceptionUtil.java:28: error: 'member def modifier' have incorrect indentat...

Samples that need updating include:

  • compute/error-reporting
  • compute/sendgrid
  • appengine/taskqueue/pull

Missing Tests and Readme

The following list of samples are missing tests and some READMEs.

  • flexible/analytics
  • flexible/async-rest
  • flexible/cloudsql
  • flexible/cloudstorage
  • flexible/cron
  • flexible/datastore (Missing README)
  • flexible/disk (Missing README)
  • flexible/endpoints
  • flexible/extending-runtime
  • flexible/mailgun
  • flexible/mailjet
  • flexible/memcache (ignore for now)
  • flexible/sendgrid
  • flexible/sparkjava
  • flexible/static-files (Also Missing README)
  • flexible/twilio
  • appengine/analytics (Also Missing README)
  • appengine/channel (Also Missing README)
  • appengine/cloudsql (Also Missing README)
  • appengine/endpoints-framework-v2/backend
  • appengine/firebase-event-proxy/gae-firebase-event-proxy
  • appengine/firebase-event-proxy/gae-firebase-listener-python
  • appengine/helloworld-new-plugins
  • appengine/images/
  • appengine/logs/
  • appengine/mail
  • appengine/mailgun
  • appengine/mailjet
  • appengine/memcache (Also Missing README)
  • appengine/oauth2
  • appengine/remote
  • appengine/sendgrid
  • appengine/static-files (Also Missing README)
  • appengine/taskqueue/pull
  • appengine/twilio
  • appengine/urlfetch
  • compute/cmdline
  • compute/error-reporting
  • compute/sendgrid

com.mailjet:mailjet-client:jar should not point at files within the project directory,

We are getting this warning in our builds. Maven threatens that "future Maven versions might no longer support building such malformed projects." so we should address this.

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.example.appengine:appengine-mailjet:war:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.mailjet:mailjet-client:jar should not point at files within the project directory, ${project.basedir}/src/main/webapp/WEB-INF/lib/client-3.1.1-jar-with-dependencies.jar will be unresolvable by dependent projects @ line 34, column 19
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.example.managedvms:managed-vms-mailjet:war:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.mailjet:mailjet-client:jar should not point at files within the project directory, ${project.basedir}/src/main/webapp/WEB-INF/lib/client-3.1.1-jar-with-dependencies.jar will be unresolvable by dependent projects @ line 35, column 19
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 

https://travis-ci.org/GoogleCloudPlatform/java-docs-samples/builds/125684562

Build failing on Jenkins due to sparkdemo

This might be the same flakey failure we were seeing in Travis.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.google.appengine.sparkdemo.UserControllerTest
Feb 08, 2016 1:00:25 AM com.google.api.services.datastore.client.BaseDatastoreFactory makeClient
WARNING: Not using any credentials
Feb 08, 2016 1:00:28 AM com.google.api.services.datastore.client.BaseDatastoreFactory makeClient
WARNING: Not using any credentials
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @3035ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:8080
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@42c69b0e{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @3198ms
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@42c69b0e{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.345 sec <<< FAILURE!
Running com.google.appengine.sparkdemo.UserServiceTest
Feb 08, 2016 1:00:33 AM com.google.api.services.datastore.client.BaseDatastoreFactory makeClient
WARNING: Not using any credentials
Feb 08, 2016 1:00:34 AM com.google.api.services.datastore.client.BaseDatastoreFactory makeClient
WARNING: Not using any credentials
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.119 sec

Results :

Failed tests:   testDeleteUser(com.google.appengine.sparkdemo.UserControllerTest): expected:<0> but was:<1>

StreamingRecognizeClien error

I'm using bin/speech-sample-streaming.sh to transcribe a 6 minutes audio file. It works perfectly for recognizing the fist sentence but after few seconds, I get this message:

com.examples.cloud.speech.StreamingRecognizeClient$1 onError
WARNING: recognize failed: Status{code=INTERNAL, description=Received EOS on DATA frame, cause=null}

Datastore examples look outdated

E.g. there is no such element as PropertyFilter.hasAncestor in
"com.google.apis" % "google-api-services-datastore-protobuf" % "v1beta2-rev1-4.0.0"

And it is not quite obvious from the API how to make ancestor queries.

helloworld-new-plugins doesn't even work

:compileJava
:processResources UP-TO-DATE
:classes
:war
:explodeWar
:assemble
:appengineRun
Traceback (most recent call last):
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 84, in
_run_file(file, globals())
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 80, in _run_file
execfile(PATHS.script_file(script_name), globals)
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1040, in
main()
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1033, in main
dev_server.start(options)
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 758, in start
options.config_paths, options.app_id)
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 813, in init
config_paths = self._config_files_from_paths(config_paths)
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 879, in _config_files_from_paths
self._config_files_from_dir(path) if os.path.isdir(path) else [path])
File "/Users/andrew.zhao/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 910, in _config_files_from_dir
(dir_path, or_web_inf))
google.appengine.tools.devappserver2.errors.AppConfigNotFoundError: "/Users/andrew.zhao/java-docs-samples/appengine/helloworld-new-plugins/build/exploded-app" is a directory but does not contain app.yaml or app.yml
:appengineRun FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':appengineRun'.

    Non zero exit: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.752 secs

Billing Issue in Google Clould Platform

I have created a new project and enabled the billing. But I Still got the billing error( Billing has disabled) .
Please help us to resolve the issue.

**Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Project charming-module-137923 (#808448574146) has billing disabled. Please enable it.",
"reason" : "forbidden"
} ],
"message" : "Project charming-module-137923 (#808448574146) has billing disabled. Please enable it.",
"status" : "PERMISSION_DENIED"
}

at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.google.cloud.language.samples.Analyze.analyzeEntities(Analyze.java:178)
at com.google.cloud.language.samples.Analyze.main(Analyze.java:78)**

Migrate App Engine standard environment Google Analytics sample here

I see that the App Engine documentation references appengine-google-analytics-java instead of the analytics sample in this repository.

It probably doesn't make sense to have two analytics samples that seem to serve the same purpose. While we're at it, it would be helpful to improve the documentation. Right now the code that is included looks out-of-place. It'd be better to break it up and talk about the different concepts separately.

Discussion: do we want to delete this repository?

This repository had a Java unittest snippet, which was supposed to link from a docs page, but that task has not done yet.

Now we decided to have appengine-local-testing-samples repo and now it has unittest snippet. Do we want to delete this repo or just delete the unittest directory and add other snippets later?

@oalami @elibixby WDYT?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.