Google Cloud Platform Java Docs Samples

repository·main·Indexed 23 days ago

https://github.com/googlecloudplatform/java-docs-samples

A collection of Java code samples demonstrating the integration of Google Cloud Platform services into Java applications. Includes practical guides for App Engine Java 11 Bundled Services, migration from Java 8 to Java 11, Cloud SQL MySQL setup for App Engine Standard, and custom entrypoint configurations.

Tokens
118.8K
Snippets
436
Records
674
Agent score
83%

What's inside googlecloudplatform-java-docs-samples

  1. Overview of Kafka to BigQuery Dataflow Flex Template

    main

    This sample demonstrates how to deploy an Apache Beam streaming pipeline using Dataflow Flex Templates. The pipeline reads JSON-encoded messages from an Apache Kafka topic, decodes them, and writes the processed data into a BigQuery table.

    The architecture consists of two main components:

    1. Kafka Server: A containerized server accessible via an external IP address that publishes messages to a topic.
    2. Apache Beam Pipeline: A Dataflow Flex Template that subscribes to the Kafka topic, consumes messages, and writes them to BigQuery.
  2. Overview of the Cloud Run Markdown Preview Sample

    main

    The Cloud Run Markdown Preview Sample is a two-service application designed to demonstrate how to secure Cloud Run services. It consists of:

    1. Frontend Service: A public service that allows users to compose Markdown text.
    2. Backend Service: A private service that renders the provided Markdown text into HTML.

    This sample is part of the Securing Cloud Run services tutorial.

  3. Overview of Spark Applications for Cloud Bigtable

    main

    This project demonstrates how to read from and write to Cloud Bigtable using Apache Spark and the Apache HBase™ Spark Connector.

    Key components:

    • Apache Spark: The execution environment for distributed data processing.
    • Apache HBase™ Spark Connector: Implements the Spark DataSource API for HBase, allowing relational queries on Cloud Bigtable data.
    • Cloud Bigtable: A managed NoSQL service for large-scale analytical and operational workloads.
    • bigtable-hbase-2.x-hadoop: A bridge that allows Spark queries to interact with Bigtable using the native Spark API via the HBase API.
  4. Overview of Cloud Run Endpoints Sample

    main

    This sample demonstrates how to create a Cloud Endpoints service designed to run on Cloud Run. It is intended to be used in conjunction with the Getting Started with Endpoints for Cloud Run with ESPv2 tutorial.

    Key dependencies used in this sample include:

    • Spring Boot: The web server framework.
    • SpringDoc OpenApi: Used for generating API documentation.
    • Jib: Used for container building.
  5. Overview of the Compute Engine Java Command Line Sample

    main

    This sample command line application demonstrates how to interact with the Google Compute Engine API using the Google Java API Client Library.

    Key functionalities demonstrated include:

    • Listing all VM instances in a specific Google Cloud Platform project and zone.
    • Checking for the existence of a VM instance named my-sample-instance.
    • Creating a new VM instance named my-sample-instance if it does not exist.
    • Deleting the my-sample-instance if it already exists.
    • Implementing and polling the status of zone specific operations to determine when create/delete actions complete successfully.
  6. Overview of App Engine Flexible Environment Java Samples

    main
    This repository provides Java code samples specifically designed for the Google App Engine flexible environment. These samples demonstrate how to build, configure, and deploy Java applications using the App Engine flexible runtime. For general Google Cloud Platform samples, refer to the main Google Cloud Platform GitHub organization.
  7. Spring Data Cloud Spanner usage patterns

    main

    The sample demonstrates three primary ways to interact with Cloud Spanner using Spring Data:

    • Administrative Operations: Use SpannerSchemaToolsSample to create and drop interleaved tables based on a root Java entity class.
    • Template-based Operations: Use SpannerTemplateSample to perform direct read and write operations with Java entities.
    • Repository-based Operations: Use SpannerRepositorySample to perform operations and queries by defining them in a repository interface.
  8. Use Google Cloud Endpoints with Java for multiple API versions

    main

    This sample demonstrates how to implement a Java backend using Google Cloud Endpoints that supports multiple versions of an API simultaneously. This allows you to manage the lifecycle of different API versions within the same project.

    For detailed architectural guidance on managing multiple versions, refer to the official Running multiple API versions documentation.