GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/appengine-java8/bigquery at main · annadata/java-docs-samples

Expand file tree

/

bigquery

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

bigquery

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline
Open in Cloud Shell

Google Cloud API Showcase: BigQuery & Cloud Monitoring in App Engine standard environment for Java 8

This API Showcase demonstrates how to run an App Engine standard environment application with dependencies on both Google BigQuery and StackDriver Monitoring.

The home page of this application provides a form to initiate a query of public data, in this case StackOverflow questions tagged with google-bigquery.

The home page also provides a summary view of the metrics that have been logged in the past 30 days.

Clone the sample app

Copy the sample apps to your local machine, and cd to the appengine-java8/bigquery directory:

git clone https://github.com/GoogleCloudPlatform/java-docs-samples
cd appengine-java8/bigquery

Setup

  • Make sure gcloud is installed and initialized:
   gcloud init
  • If this is the first time you are creating an App Engine project
   gcloud app create
  • For local development, set up authentication
  • Enable BigQuery and Monitoring APIs

Run locally

Run using shown Maven command. You can then direct your browser to http://localhost:8080/ to see the most recent query run (since the app started) and the metrics from the past 30 days.

mvn appengine:run

Note: The first time the app is run (or after any metrics definitions have been deleted) it may take up to 5 minutes for the MetricDescriptors to sync with StackDriver before any results are shown. If you do not see results, please wait a few moments and try again.

Deploy

  • Deploy to App Engine standard environment using the following Maven command.
   mvn clean package appengine:deploy
  • Direct your browser to https://<your-project-id>.appspot.com.
  • View more in-depth metrics data on the Cloud Monitoring Dashboard
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.