idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
23,700 | public static TableId of ( String project , String dataset , String table ) { return new TableId ( checkNotNull ( project ) , checkNotNull ( dataset ) , checkNotNull ( table ) ) ; } | Creates a table identity given project s dataset s and table s user - defined ids . |
23,701 | public static TableId of ( String dataset , String table ) { return new TableId ( null , checkNotNull ( dataset ) , checkNotNull ( table ) ) ; } | Creates a table identity given dataset s and table s user - defined ids . |
23,702 | static < T > T convertToCustomClass ( Object object , Class < T > clazz ) { return deserializeToClass ( object , clazz , ErrorPath . EMPTY ) ; } | Converts a standard library Java representation of JSON data to an object of the provided class . |
23,703 | public final Operation patchRegionBackendService ( String backendService , BackendService backendServiceResource , List < String > fieldMask ) { PatchRegionBackendServiceHttpRequest request = PatchRegionBackendServiceHttpRequest . newBuilder ( ) . setBackendService ( backendService ) . setBackendServiceResource ( backe... | Updates the specified regional BackendService resource with the data included in the request . There are several restrictions and guidelines to keep in mind when updating a backend service . Read Restrictions and Guidelines for more information . This method supports PATCH semantics and uses the JSON merge patch format... |
23,704 | public final Group updateGroup ( Group group ) { UpdateGroupRequest request = UpdateGroupRequest . newBuilder ( ) . setGroup ( group ) . build ( ) ; return updateGroup ( request ) ; } | Updates an existing group . You can change any group attributes except name . |
23,705 | public final Operation deleteAccessConfigInstance ( ProjectZoneInstanceName instance , String networkInterface , String accessConfig ) { DeleteAccessConfigInstanceHttpRequest request = DeleteAccessConfigInstanceHttpRequest . newBuilder ( ) . setInstance ( instance == null ? null : instance . toString ( ) ) . setNetwork... | Deletes an access config from an instance s network interface . |
23,706 | public final Operation detachDiskInstance ( ProjectZoneInstanceName instance , String deviceName ) { DetachDiskInstanceHttpRequest request = DetachDiskInstanceHttpRequest . newBuilder ( ) . setInstance ( instance == null ? null : instance . toString ( ) ) . setDeviceName ( deviceName ) . build ( ) ; return detachDiskIn... | Detaches a disk from an instance . |
23,707 | public final SerialPortOutput getSerialPortOutputInstance ( ProjectZoneInstanceName instance , Integer port , String start ) { GetSerialPortOutputInstanceHttpRequest request = GetSerialPortOutputInstanceHttpRequest . newBuilder ( ) . setInstance ( instance == null ? null : instance . toString ( ) ) . setPort ( port ) .... | Returns the last 1 MB of serial port output from the specified instance . |
23,708 | public final Operation setDiskAutoDeleteInstance ( ProjectZoneInstanceName instance , Boolean autoDelete , String deviceName ) { SetDiskAutoDeleteInstanceHttpRequest request = SetDiskAutoDeleteInstanceHttpRequest . newBuilder ( ) . setInstance ( instance == null ? null : instance . toString ( ) ) . setAutoDelete ( auto... | Sets the auto - delete flag for a disk attached to an instance . |
23,709 | public final Operation setShieldedInstanceIntegrityPolicyInstance ( ProjectZoneInstanceName instance , ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource , List < String > fieldMask ) { SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request = SetShieldedInstanceIntegrityPolicyInstanceHttpReq... | Sets the Shielded Instance integrity policy for an instance . You can only use this method on a running instance . This method supports PATCH semantics and uses the JSON merge patch format and processing rules . |
23,710 | public final Operation updateAccessConfigInstance ( ProjectZoneInstanceName instance , String networkInterface , AccessConfig accessConfigResource ) { UpdateAccessConfigInstanceHttpRequest request = UpdateAccessConfigInstanceHttpRequest . newBuilder ( ) . setInstance ( instance == null ? null : instance . toString ( ) ... | Updates the specified access config from an instance s network interface with the data included in the request . This method supports PATCH semantics and uses the JSON merge patch format and processing rules . |
23,711 | public final Operation updateNetworkInterfaceInstance ( ProjectZoneInstanceName instance , String networkInterface , NetworkInterface networkInterfaceResource , List < String > fieldMask ) { UpdateNetworkInterfaceInstanceHttpRequest request = UpdateNetworkInterfaceInstanceHttpRequest . newBuilder ( ) . setInstance ( in... | Updates an instance s network interface . This method follows PATCH semantics . |
23,712 | public final Operation updateShieldedInstanceConfigInstance ( ProjectZoneInstanceName instance , ShieldedInstanceConfig shieldedInstanceConfigResource , List < String > fieldMask ) { UpdateShieldedInstanceConfigInstanceHttpRequest request = UpdateShieldedInstanceConfigInstanceHttpRequest . newBuilder ( ) . setInstance ... | Updates the Shielded Instance config for an instance . You can only use this method on a stopped instance . This method supports PATCH semantics and uses the JSON merge patch format and processing rules . |
23,713 | public Map < String , Object > getData ( ) { Map < String , Object > result = super . getData ( ) ; Preconditions . checkNotNull ( result , "Data in a QueryDocumentSnapshot should be non-null" ) ; return result ; } | Returns the fields of the document as a Map . Field values will be converted to their native Java representation . |
23,714 | public final GenerateAccessTokenResponse generateAccessToken ( ServiceAccountName name , List < String > delegates , List < String > scope , Duration lifetime ) { GenerateAccessTokenRequest request = GenerateAccessTokenRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( ... | Generates an OAuth 2 . 0 access token for a service account . |
23,715 | public final GenerateIdTokenResponse generateIdToken ( ServiceAccountName name , List < String > delegates , String audience , boolean includeEmail ) { GenerateIdTokenRequest request = GenerateIdTokenRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( delegates ) . setAu... | Generates an OpenID Connect ID token for a service account . |
23,716 | public final SignBlobResponse signBlob ( ServiceAccountName name , List < String > delegates , ByteString payload ) { SignBlobRequest request = SignBlobRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( delegates ) . setPayload ( payload ) . build ( ) ; return signBlob ... | Signs a blob using a service account s system - managed private key . |
23,717 | public final SignJwtResponse signJwt ( ServiceAccountName name , List < String > delegates , String payload ) { SignJwtRequest request = SignJwtRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( delegates ) . setPayload ( payload ) . build ( ) ; return signJwt ( request... | Signs a JWT using a service account s system - managed private key . |
23,718 | public final GenerateIdentityBindingAccessTokenResponse generateIdentityBindingAccessToken ( ServiceAccountName name , List < String > scope , String jwt ) { GenerateIdentityBindingAccessTokenRequest request = GenerateIdentityBindingAccessTokenRequest . newBuilder ( ) . setName ( name == null ? null : name . toString (... | Exchange a JWT signed by third party identity provider to an OAuth 2 . 0 access token |
23,719 | public Operation deprecate ( DeprecationStatus < ImageId > deprecationStatus , OperationOption ... options ) { return compute . deprecate ( getImageId ( ) , deprecationStatus , options ) ; } | Deprecates this image . |
23,720 | public final ReadSession createReadSession ( TableReference tableReference , String parent , int requestedStreams ) { CreateReadSessionRequest request = CreateReadSessionRequest . newBuilder ( ) . setTableReference ( tableReference ) . setParent ( parent ) . setRequestedStreams ( requestedStreams ) . build ( ) ; return... | Creates a new read session . A read session divides the contents of a BigQuery table into one or more streams which can then be used to read data from the table . The read session also specifies properties of the data to be read such as a list of columns or a push - down filter describing the rows to be returned . |
23,721 | public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams ( ReadSession session , int requestedStreams ) { BatchCreateReadSessionStreamsRequest request = BatchCreateReadSessionStreamsRequest . newBuilder ( ) . setSession ( session ) . setRequestedStreams ( requestedStreams ) . build ( ) ; return ... | Creates additional streams for a ReadSession . This API can be used to dynamically adjust the parallelism of a batch processing task upwards by adding additional workers . |
23,722 | public final void finalizeStream ( Stream stream ) { FinalizeStreamRequest request = FinalizeStreamRequest . newBuilder ( ) . setStream ( stream ) . build ( ) ; finalizeStream ( request ) ; } | Triggers the graceful termination of a single stream in a ReadSession . This API can be used to dynamically adjust the parallelism of a batch processing task downwards without losing data . |
23,723 | public final SplitReadStreamResponse splitReadStream ( Stream originalStream ) { SplitReadStreamRequest request = SplitReadStreamRequest . newBuilder ( ) . setOriginalStream ( originalStream ) . build ( ) ; return splitReadStream ( request ) ; } | Splits a given read stream into two Streams . These streams are referred to as the primary and the residual of the split . The original stream can still be read from in the same manner as before . Both of the returned streams can also be read from and the total rows return by both child streams will be the same as the ... |
23,724 | public static Builder newBuilder ( String query , List < UserDefinedFunction > functions ) { return newBuilder ( query ) . setUserDefinedFunctions ( functions ) ; } | Returns a builder for a BigQuery view definition . |
23,725 | public static ViewDefinition of ( String query , List < UserDefinedFunction > functions ) { return newBuilder ( query , functions ) . build ( ) ; } | Creates a BigQuery view definition given a query and some user - defined functions . |
23,726 | private static void countFile ( String fname ) throws Exception { final int bufSize = 50 * 1024 * 1024 ; Queue < Future < WorkUnit > > work = new ArrayDeque < > ( ) ; Path path = Paths . get ( new URI ( fname ) ) ; long size = Files . size ( path ) ; System . out . println ( fname + ": " + size + " bytes." ) ; int nThr... | Print the length and MD5 of the indicated file . |
23,727 | public final Queue updateQueue ( Queue queue , FieldMask updateMask ) { UpdateQueueRequest request = UpdateQueueRequest . newBuilder ( ) . setQueue ( queue ) . setUpdateMask ( updateMask ) . build ( ) ; return updateQueue ( request ) ; } | Updates a queue . |
23,728 | private Mutation addMutation ( ) { Preconditions . checkState ( ! committed , "Cannot modify a WriteBatch that has already been committed." ) ; Mutation mutation = new Mutation ( ) ; mutations . add ( mutation ) ; return mutation ; } | Adds a new mutation to the batch . |
23,729 | private Map < FieldPath , Object > applyFieldMask ( Map < String , Object > fields , List < FieldPath > fieldMask ) { List < FieldPath > remainingFields = new ArrayList < > ( fieldMask ) ; Map < FieldPath , Object > filteredData = applyFieldMask ( fields , remainingFields , FieldPath . empty ( ) ) ; if ( ! remainingFie... | Removes all values in fields that are not specified in fieldMask . |
23,730 | private Map < FieldPath , Object > applyFieldMask ( Map < String , Object > fields , List < FieldPath > fieldMask , FieldPath root ) { Map < FieldPath , Object > filteredMap = new HashMap < > ( ) ; for ( Entry < String , Object > entry : fields . entrySet ( ) ) { FieldPath currentField = root . append ( FieldPath . of ... | Strips all values in fields that are not specified in fieldMask . Modifies fieldMask inline and removes all matched fields . |
23,731 | public final BatchAnnotateImagesResponse batchAnnotateImages ( List < AnnotateImageRequest > requests ) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest . newBuilder ( ) . addAllRequests ( requests ) . build ( ) ; return batchAnnotateImages ( request ) ; } | Run image detection and annotation for a batch of images . |
23,732 | public final ListTimeSeriesPagedResponse listTimeSeries ( ProjectName name , String filter , TimeInterval interval , ListTimeSeriesRequest . TimeSeriesView view ) { ListTimeSeriesRequest request = ListTimeSeriesRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . setFilter ( filter ) . set... | Lists time series that match a filter . This method does not require a Stackdriver account . |
23,733 | public final Operation deleteSignedUrlKeyBackendService ( String backendService , String keyName ) { DeleteSignedUrlKeyBackendServiceHttpRequest request = DeleteSignedUrlKeyBackendServiceHttpRequest . newBuilder ( ) . setBackendService ( backendService ) . setKeyName ( keyName ) . build ( ) ; return deleteSignedUrlKeyB... | Deletes a key for validating requests with signed URLs for this backend service . |
23,734 | public final Operation patchBackendService ( String backendService , BackendService backendServiceResource , List < String > fieldMask ) { PatchBackendServiceHttpRequest request = PatchBackendServiceHttpRequest . newBuilder ( ) . setBackendService ( backendService ) . setBackendServiceResource ( backendServiceResource ... | Patches the specified BackendService resource with the data included in the request . There are several restrictions and guidelines to keep in mind when updating a backend service . Read Restrictions and Guidelines for more information . This method supports PATCH semantics and uses the JSON merge patch format and proc... |
23,735 | public final Application updateApplication ( Application application ) { UpdateApplicationRequest request = UpdateApplicationRequest . newBuilder ( ) . setApplication ( application ) . build ( ) ; return updateApplication ( request ) ; } | Updates specified application . |
23,736 | @ SuppressWarnings ( "WeakerAccess" ) public com . google . bigtable . admin . v2 . ProjectName getProjectName ( ) { return com . google . bigtable . admin . v2 . ProjectName . of ( projectId ) ; } | Gets the ProjectName this client is associated with . |
23,737 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Instance > createInstanceAsync ( CreateInstanceRequest request ) { return ApiFutures . transform ( stub . createInstanceOperationCallable ( ) . futureCall ( request . toProto ( projectId ) ) , new ApiFunction < com . google . bigtable . admin . v2 . Instance , In... | Asynchronously creates a new instance and returns its representation wrapped in a future . |
23,738 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Instance > updateInstanceAsync ( UpdateInstanceRequest request ) { return ApiFutures . transform ( stub . partialUpdateInstanceOperationCallable ( ) . futureCall ( request . toProto ( projectId ) ) , new ApiFunction < com . google . bigtable . admin . v2 . Instan... | Asynchronously updates a new instance and returns its representation wrapped in a future . |
23,739 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Instance > getInstanceAsync ( String instanceId ) { String name = NameUtil . formatInstanceName ( projectId , instanceId ) ; com . google . bigtable . admin . v2 . GetInstanceRequest request = com . google . bigtable . admin . v2 . GetInstanceRequest . newBuilder... | Asynchronously gets the instance representation by ID wrapped in a future . |
23,740 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < List < Instance > > listInstancesAsync ( ) { com . google . bigtable . admin . v2 . ListInstancesRequest request = com . google . bigtable . admin . v2 . ListInstancesRequest . newBuilder ( ) . setParent ( NameUtil . formatProjectName ( projectId ) ) . build ( ) ... | Asynchronously lists all of the instances in the current project . |
23,741 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Void > deleteInstanceAsync ( String instanceId ) { String instanceName = NameUtil . formatInstanceName ( projectId , instanceId ) ; com . google . bigtable . admin . v2 . DeleteInstanceRequest request = com . google . bigtable . admin . v2 . DeleteInstanceRequest... | Asynchronously deletes the specified instance . |
23,742 | public ApiFuture < Boolean > existsAsync ( String instanceId ) { ApiFuture < Instance > protoFuture = getInstanceAsync ( instanceId ) ; ApiFuture < Boolean > existsFuture = ApiFutures . transform ( protoFuture , new ApiFunction < Instance , Boolean > ( ) { public Boolean apply ( Instance ignored ) { return true ; } } ,... | Asynchronously checks if the instance specified by the instanceId exists |
23,743 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Cluster > createClusterAsync ( CreateClusterRequest request ) { return ApiFutures . transform ( stub . createClusterOperationCallable ( ) . futureCall ( request . toProto ( projectId ) ) , new ApiFunction < com . google . bigtable . admin . v2 . Cluster , Cluster... | Asynchronously creates a new cluster in the specified instance . |
23,744 | @ SuppressWarnings ( "WeakerAccess" ) public Cluster getCluster ( String instanceId , String clusterId ) { return ApiExceptions . callAndTranslateApiException ( getClusterAsync ( instanceId , clusterId ) ) ; } | Get the cluster representation by ID . |
23,745 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Cluster > getClusterAsync ( String instanceId , String clusterId ) { String name = NameUtil . formatClusterName ( projectId , instanceId , clusterId ) ; com . google . bigtable . admin . v2 . GetClusterRequest request = com . google . bigtable . admin . v2 . GetC... | Asynchronously gets the cluster representation by ID . |
23,746 | @ SuppressWarnings ( "WeakerAccess" ) public List < Cluster > listClusters ( String instanceId ) { return ApiExceptions . callAndTranslateApiException ( listClustersAsync ( instanceId ) ) ; } | Lists all clusters in the specified instance . |
23,747 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < List < Cluster > > listClustersAsync ( String instanceId ) { String name = NameUtil . formatInstanceName ( projectId , instanceId ) ; com . google . bigtable . admin . v2 . ListClustersRequest request = com . google . bigtable . admin . v2 . ListClustersRequest .... | Asynchronously lists all clusters in the specified instance . |
23,748 | @ SuppressWarnings ( "WeakerAccess" ) public Cluster resizeCluster ( String instanceId , String clusterId , int numServeNodes ) { return ApiExceptions . callAndTranslateApiException ( resizeClusterAsync ( instanceId , clusterId , numServeNodes ) ) ; } | Resizes the cluster s node count . Please note that only clusters that belong to a PRODUCTION instance can be resized . |
23,749 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < AppProfile > createAppProfileAsync ( CreateAppProfileRequest request ) { return ApiFutures . transform ( stub . createAppProfileCallable ( ) . futureCall ( request . toProto ( projectId ) ) , new ApiFunction < com . google . bigtable . admin . v2 . AppProfile , A... | Asynchronously creates a new app profile . |
23,750 | @ SuppressWarnings ( "WeakerAccess" ) public AppProfile getAppProfile ( String instanceId , String appProfileId ) { return ApiExceptions . callAndTranslateApiException ( getAppProfileAsync ( instanceId , appProfileId ) ) ; } | Get the app profile by id . |
23,751 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < AppProfile > getAppProfileAsync ( String instanceId , String appProfileId ) { String name = NameUtil . formatAppProfileName ( projectId , instanceId , appProfileId ) ; GetAppProfileRequest request = GetAppProfileRequest . newBuilder ( ) . setName ( name . toStrin... | Asynchronously get the app profile by id . |
23,752 | @ SuppressWarnings ( "WeakerAccess" ) public List < AppProfile > listAppProfiles ( String instanceId ) { return ApiExceptions . callAndTranslateApiException ( listAppProfilesAsync ( instanceId ) ) ; } | Lists all app profiles of the specified instance . |
23,753 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < List < AppProfile > > listAppProfilesAsync ( String instanceId ) { String instanceName = NameUtil . formatInstanceName ( projectId , instanceId ) ; ListAppProfilesRequest request = ListAppProfilesRequest . newBuilder ( ) . setParent ( instanceName ) . build ( ) ;... | Asynchronously lists all app profiles of the specified instance . |
23,754 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < AppProfile > updateAppProfileAsync ( UpdateAppProfileRequest request ) { return ApiFutures . transform ( stub . updateAppProfileOperationCallable ( ) . futureCall ( request . toProto ( projectId ) ) , new ApiFunction < com . google . bigtable . admin . v2 . AppPr... | Asynchronously updates an existing app profile . |
23,755 | @ SuppressWarnings ( "WeakerAccess" ) public void deleteAppProfile ( String instanceId , String appProfileId ) { ApiExceptions . callAndTranslateApiException ( deleteAppProfileAsync ( instanceId , appProfileId ) ) ; } | Deletes the specified app profile . |
23,756 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Void > deleteAppProfileAsync ( String instanceId , String appProfileId ) { String name = NameUtil . formatAppProfileName ( projectId , instanceId , appProfileId ) ; DeleteAppProfileRequest request = DeleteAppProfileRequest . newBuilder ( ) . setName ( name ) . bu... | Asynchronously deletes the specified app profile . |
23,757 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Policy > getIamPolicyAsync ( String instanceId ) { String name = NameUtil . formatInstanceName ( projectId , instanceId ) ; GetIamPolicyRequest request = GetIamPolicyRequest . newBuilder ( ) . setResource ( name ) . build ( ) ; final IamPolicyMarshaller marshalle... | Asynchronously gets the IAM access control policy for the specified instance . |
23,758 | @ SuppressWarnings ( "WeakerAccess" ) public Policy setIamPolicy ( String instanceId , Policy policy ) { return ApiExceptions . callAndTranslateApiException ( setIamPolicyAsync ( instanceId , policy ) ) ; } | Replaces the IAM policy associated with the specified instance . |
23,759 | @ SuppressWarnings ( "WeakerAccess" ) public ApiFuture < Policy > setIamPolicyAsync ( String instanceId , Policy policy ) { String name = NameUtil . formatInstanceName ( projectId , instanceId ) ; final IamPolicyMarshaller marshaller = new IamPolicyMarshaller ( ) ; SetIamPolicyRequest request = SetIamPolicyRequest . ne... | Asynchronously replaces the IAM policy associated with the specified instance . |
23,760 | public static Builder newBuilder ( String projectId , String datasetId ) { return newBuilder ( DatasetId . of ( projectId , datasetId ) ) ; } | Returns a builder for the DatasetInfo object given it s user - defined project and dataset ids . |
23,761 | public static KeySet all ( ) { return new KeySet ( true , ImmutableList . < Key > of ( ) , ImmutableList . < KeyRange > of ( ) ) ; } | Creates a key set that will retrieve all rows of a table or index . |
23,762 | public final ErrorGroup updateGroup ( ErrorGroup group ) { UpdateGroupRequest request = UpdateGroupRequest . newBuilder ( ) . setGroup ( group ) . build ( ) ; return updateGroup ( request ) ; } | Replace the data for the specified group . Fails if the group does not exist . |
23,763 | public final Operation updateRegionAutoscaler ( String autoscaler , String region , Autoscaler autoscalerResource , List < String > fieldMask ) { UpdateRegionAutoscalerHttpRequest request = UpdateRegionAutoscalerHttpRequest . newBuilder ( ) . setAutoscaler ( autoscaler ) . setRegion ( region ) . setAutoscalerResource (... | Updates an autoscaler in the specified project using the data included in the request . |
23,764 | @ BetaApi ( "The surface for long-running operations is not stable yet and may change in the future." ) public final OperationFuture < Empty , Struct > importAgentAsync ( ImportAgentRequest request ) { return importAgentOperationCallable ( ) . futureCall ( request ) ; } | Imports the specified agent from a ZIP file . |
23,765 | @ BetaApi ( "The surface for long-running operations is not stable yet and may change in the future." ) public final OperationFuture < Empty , Struct > restoreAgentAsync ( RestoreAgentRequest request ) { return restoreAgentOperationCallable ( ) . futureCall ( request ) ; } | Restores the specified agent from a ZIP file . |
23,766 | static String autoId ( ) { StringBuilder builder = new StringBuilder ( ) ; int maxRandom = AUTO_ID_ALPHABET . length ( ) ; for ( int i = 0 ; i < AUTO_ID_LENGTH ; i ++ ) { builder . append ( AUTO_ID_ALPHABET . charAt ( RANDOM . nextInt ( maxRandom ) ) ) ; } return builder . toString ( ) ; } | Creates a pseudo - random 20 - character ID that can be used for Firestore documents . |
23,767 | private < T > void runTransaction ( final Transaction . Function < T > transactionCallback , final SettableApiFuture < T > resultFuture , final TransactionOptions options ) { Span span = tracer . spanBuilder ( "CloudFirestore.Transaction" ) . startSpan ( ) ; try ( Scope s = tracer . withSpan ( span ) ) { runTransaction... | Transaction functions that returns its result in the provided SettableFuture . |
23,768 | < RequestT , ResponseT > void streamRequest ( RequestT requestT , ApiStreamObserver < ResponseT > responseObserverT , ServerStreamingCallable < RequestT , ResponseT > callable ) { Preconditions . checkState ( ! closed , "Firestore client has already been closed" ) ; callable . serverStreamingCall ( requestT , responseO... | Request funnel for all unidirectional streaming requests . |
23,769 | < RequestT , ResponseT > ApiStreamObserver < RequestT > streamRequest ( ApiStreamObserver < ResponseT > responseObserverT , BidiStreamingCallable < RequestT , ResponseT > callable ) { Preconditions . checkState ( ! closed , "Firestore client has already been closed" ) ; return callable . bidiStreamingCall ( responseObs... | Request funnel for all bidirectional streaming requests . |
23,770 | public CreateTableRequest addFamily ( String familyId ) { Preconditions . checkNotNull ( familyId ) ; tableRequest . putColumnFamilies ( familyId , ColumnFamily . getDefaultInstance ( ) ) ; return this ; } | Adds a new columnFamily to the configuration |
23,771 | public CreateTableRequest addSplit ( ByteString key ) { Preconditions . checkNotNull ( key ) ; createTableRequest . addInitialSplitsBuilder ( ) . setKey ( key ) ; return this ; } | Adds split at the specified key to the configuration |
23,772 | public final Operation patchSubnetwork ( ProjectRegionSubnetworkName subnetwork , Subnetwork subnetworkResource , List < String > fieldMask ) { PatchSubnetworkHttpRequest request = PatchSubnetworkHttpRequest . newBuilder ( ) . setSubnetwork ( subnetwork == null ? null : subnetwork . toString ( ) ) . setSubnetworkResour... | Patches the specified subnetwork with the data included in the request . Only certain fields can up updated with a patch request as indicated in the field descriptions . You must specify the current fingeprint of the subnetwork resource being patched . |
23,773 | public final Operation patchSecurityPolicy ( ProjectGlobalSecurityPolicyName securityPolicy , SecurityPolicy securityPolicyResource , List < String > fieldMask ) { PatchSecurityPolicyHttpRequest request = PatchSecurityPolicyHttpRequest . newBuilder ( ) . setSecurityPolicy ( securityPolicy == null ? null : securityPolic... | Patches the specified policy with the data included in the request . |
23,774 | public static Builder newBuilder ( TableId sourceTable , String destinationUri ) { return newBuilder ( sourceTable , ImmutableList . of ( checkNotNull ( destinationUri ) ) ) ; } | Creates a builder for a BigQuery Extract Job configuration given source table and destination URI . |
23,775 | public static Builder newBuilder ( TableId sourceTable , List < String > destinationUris ) { return new Builder ( ) . setSourceTable ( sourceTable ) . setDestinationUris ( destinationUris ) ; } | Creates a builder for a BigQuery Extract Job configuration given source table and destination URIs . |
23,776 | public static ExtractJobConfiguration of ( TableId sourceTable , String destinationUri ) { return newBuilder ( sourceTable , destinationUri ) . build ( ) ; } | Returns a BigQuery Extract Job configuration for the given source table and destination URI . |
23,777 | public static ExtractJobConfiguration of ( TableId sourceTable , List < String > destinationUris , String format ) { return newBuilder ( sourceTable , destinationUris ) . setFormat ( format ) . build ( ) ; } | Returns a BigQuery Extract Job configuration for the given source table format and destination URIs . |
23,778 | public final ListScanConfigsPagedResponse listScanConfigs ( ProjectName parent , String filter ) { ListScanConfigsRequest request = ListScanConfigsRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . setFilter ( filter ) . build ( ) ; return listScanConfigs ( request ) ; } | Lists scan configurations for the specified project . |
23,779 | private void ensureFetching ( long blockIndex ) { if ( fetching != null ) { if ( fetching . futureBuf . isDone ( ) ) { full . add ( fetching ) ; fetching = null ; } else { return ; } } for ( WorkUnit w : full ) { if ( w . blockIndex == blockIndex ) { return ; } } if ( full . size ( ) < BUF_COUNT ) { fetching = new Work... | make sure it now goes looking for that block index . |
23,780 | public synchronized int read ( ByteBuffer dst ) throws IOException { if ( ! open ) { throw new ClosedChannelException ( ) ; } try { if ( trackTime ) { msBetweenCallsToRead += betweenCallsToRead . elapsed ( TimeUnit . MILLISECONDS ) ; } ByteBuffer src ; try { Stopwatch waitingForData ; if ( trackTime ) { waitingForData ... | Reads a sequence of bytes from this channel into the given buffer . |
23,781 | public static RegionOperationId of ( RegionId regionId , String operation ) { return new RegionOperationId ( regionId . getProject ( ) , regionId . getRegion ( ) , operation ) ; } | Returns a region operation identity given the region identity and the operation name . |
23,782 | public static RegionOperationId of ( String region , String operation ) { return new RegionOperationId ( null , region , operation ) ; } | Returns a region operation identity given the region and operation names . |
23,783 | public static RegionOperationId of ( String project , String region , String operation ) { return new RegionOperationId ( project , region , operation ) ; } | Returns a region operation identity given project region and operation names . |
23,784 | public void runQueryPermanentTable ( String destinationDataset , String destinationTable ) throws InterruptedException { String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;" ; QueryJobConfiguration queryConfig = QueryJobConfiguration . newBuilder ( query ) . setDestinationTabl... | Example of running a query and saving the results to a table . |
23,785 | public void runUncachedQuery ( ) throws TimeoutException , InterruptedException { String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;" ; QueryJobConfiguration queryConfig = QueryJobConfiguration . newBuilder ( query ) . setUseQueryCache ( false ) . build ( ) ; for ( FieldValue... | Example of running a query with the cache disabled . |
23,786 | public void runBatchQuery ( ) throws TimeoutException , InterruptedException { String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;" ; QueryJobConfiguration queryConfig = QueryJobConfiguration . newBuilder ( query ) . setPriority ( QueryJobConfiguration . Priority . BATCH ) . b... | Example of running a batch query . |
23,787 | public void runQueryWithNamedParameters ( ) throws InterruptedException { String corpus = "romeoandjuliet" ; long minWordCount = 250 ; String query = "SELECT word, word_count\n" + "FROM `bigquery-public-data.samples.shakespeare`\n" + "WHERE corpus = @corpus\n" + "AND word_count >= @min_word_count\n" + "ORDER BY word_co... | Example of running a query with named query parameters . |
23,788 | public void runQueryWithArrayParameters ( ) throws InterruptedException { String gender = "M" ; String [ ] states = { "WA" , "WI" , "WV" , "WY" } ; String query = "SELECT name, sum(number) as count\n" + "FROM `bigquery-public-data.usa_names.usa_1910_2013`\n" + "WHERE gender = @gender\n" + "AND state IN UNNEST(@states)\... | Example of running a query with array query parameters . |
23,789 | public void runQueryWithTimestampParameters ( ) throws InterruptedException { ZonedDateTime timestamp = LocalDateTime . of ( 2016 , 12 , 7 , 8 , 0 , 0 ) . atZone ( ZoneOffset . UTC ) ; String query = "SELECT TIMESTAMP_ADD(@ts_value, INTERVAL 1 HOUR);" ; QueryJobConfiguration queryConfig = QueryJobConfiguration . newBui... | Example of running a query with timestamp query parameters . |
23,790 | public void loadTableGcsParquet ( String datasetName ) throws InterruptedException { String sourceUri = "gs://cloud-samples-data/bigquery/us-states/us-states.parquet" ; TableId tableId = TableId . of ( datasetName , "us_states" ) ; LoadJobConfiguration configuration = LoadJobConfiguration . builder ( tableId , sourceUr... | Example of loading a parquet file from GCS to a table . |
23,791 | public void copyTables ( String datasetId , String destinationTableId ) throws InterruptedException { generateTableWithDdl ( datasetId , "table1" ) ; generateTableWithDdl ( datasetId , "table2" ) ; TableId destinationTable = TableId . of ( datasetId , destinationTableId ) ; CopyJobConfiguration configuration = CopyJobC... | Example of copying multiple tables to a destination . |
23,792 | public void undeleteTable ( String datasetId ) throws InterruptedException { generateTableWithDdl ( datasetId , "oops_undelete_me" ) ; String tableId = "oops_undelete_me" ; long snapTime = Instant . now ( ) . toEpochMilli ( ) ; bigquery . delete ( TableId . of ( datasetId , tableId ) ) ; String snapshotTableId = String... | Example of undeleting a table . |
23,793 | public UnaryCallSettings . Builder getApiCallSettings ( RetrySettings retrySettings ) { return UnaryCallSettings . newUnaryCallSettingsBuilder ( ) . setRetrySettings ( retrySettings ) ; } | Returns a builder for API call settings . |
23,794 | public static TransportChannelProvider setUpChannelProvider ( InstantiatingGrpcChannelProvider . Builder providerBuilder , ServiceOptions < ? , ? > serviceOptions ) { providerBuilder . setEndpoint ( serviceOptions . getHost ( ) ) ; return providerBuilder . build ( ) ; } | Returns a channel provider from the given default provider . |
23,795 | public SeekableByteChannel newByteChannel ( Path path , Set < ? extends OpenOption > options , FileAttribute < ? > ... attrs ) throws IOException { checkNotNull ( path ) ; initStorage ( ) ; CloudStorageUtil . checkNotNullArray ( attrs ) ; if ( options . contains ( StandardOpenOption . WRITE ) ) { return newWriteChannel... | Open a file for reading or writing . To read receiver - pays buckets specify the BlobSourceOption . userProject option . |
23,796 | public void createDirectory ( Path dir , FileAttribute < ? > ... attrs ) { CloudStorageUtil . checkPath ( dir ) ; CloudStorageUtil . checkNotNullArray ( attrs ) ; } | Does nothing since Google Cloud Storage uses fake directories . |
23,797 | Page < Bucket > listBuckets ( Storage . BucketListOption ... options ) { initStorage ( ) ; return storage . list ( options ) ; } | Lists the project s buckets . But use the one in CloudStorageFileSystem . |
23,798 | public boolean exists ( BucketSourceOption ... options ) { int length = options . length ; Storage . BucketGetOption [ ] getOptions = Arrays . copyOf ( toGetOptions ( this , options ) , length + 1 ) ; getOptions [ length ] = Storage . BucketGetOption . fields ( ) ; return storage . get ( getName ( ) , getOptions ) != n... | Checks if this bucket exists . |
23,799 | static void setDefaultCloudStorageConfiguration ( CloudStorageConfiguration config ) { if ( null == config ) { userSpecifiedDefault = CloudStorageConfiguration . DEFAULT ; } else { userSpecifiedDefault = config ; } } | Don t call this one call the one in CloudStorageFileSystemProvider . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.