Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples: Fix schema exception handling #1520

Merged
merged 39 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3c6897c
samples: schema evolution
kamalaboulhosn Jan 23, 2023
7ea48d9
samples: schema evolution
kamalaboulhosn Jan 23, 2023
3438da5
Merge branch 'googleapis:main' into master
kamalaboulhosn Jan 23, 2023
4e5c026
Format fixes
kamalaboulhosn Jan 23, 2023
032a92f
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Jan 23, 2023
8a81408
Fix documentation for field.
kamalaboulhosn Jan 23, 2023
90800ac
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 26, 2023
a88377c
Add back in working asserts
kamalaboulhosn Jan 26, 2023
6a741ea
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Jan 26, 2023
9a07bbd
Formatting fixes
kamalaboulhosn Jan 26, 2023
df27d57
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 30, 2023
7d1c561
Version/delete fixes
kamalaboulhosn Feb 14, 2023
d917065
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Feb 14, 2023
646afa7
samples: schema evolution
kamalaboulhosn Jan 23, 2023
e0cce5a
samples: schema evolution
kamalaboulhosn Jan 23, 2023
51deeb0
Format fixes
kamalaboulhosn Jan 23, 2023
a53b564
Fix documentation for field.
kamalaboulhosn Jan 23, 2023
f1224e6
Add back in working asserts
kamalaboulhosn Jan 26, 2023
de55b05
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 26, 2023
503339f
Formatting fixes
kamalaboulhosn Jan 26, 2023
cbd910c
Version/delete fixes
kamalaboulhosn Feb 14, 2023
7d15680
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Feb 23, 2023
1c7e840
samples: Schema evolution (#1499)
kamalaboulhosn Feb 23, 2023
f5d8b39
Merge branch 'googleapis:main' into master
kamalaboulhosn Feb 23, 2023
6195b1c
Minor fixes for comments
kamalaboulhosn Feb 23, 2023
24cc817
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Feb 23, 2023
18e9c3b
samples: Schema evolution (#1499)
kamalaboulhosn Feb 23, 2023
37a35cb
Merge branch 'schema-evolution-examples' of https://github.com/google…
kamalaboulhosn Feb 23, 2023
79b0514
Merge branch 'schema-evolution-examples' into master
kamalaboulhosn Feb 23, 2023
b1d2309
Fix rollback example
kamalaboulhosn Mar 10, 2023
3f74191
Formatting
kamalaboulhosn Mar 10, 2023
8b1288a
Formatting and wording fixes
kamalaboulhosn Mar 10, 2023
5057f17
Add new schemas to test directory
kamalaboulhosn Mar 10, 2023
ba38121
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 10, 2023
9dff92e
Samples: Fix exception handling
kamalaboulhosn Mar 11, 2023
30b63a8
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Mar 11, 2023
13cbbf9
Merge remote-tracking branch 'upstream/main'
kamalaboulhosn Mar 11, 2023
3185a3e
fix: Set x-goog-request-params for streaming pull request
kamalaboulhosn Mar 14, 2023
3b1f4d9
Revert "fix: Set x-goog-request-params for streaming pull request"
kamalaboulhosn Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// [START pubsub_commit_avro_schema]

import com.google.api.gax.rpc.AlreadyExistsException;
import com.google.api.gax.rpc.NotFoundException;
import com.google.cloud.pubsub.v1.SchemaServiceClient;
import com.google.pubsub.v1.ProjectName;
import com.google.pubsub.v1.Schema;
Expand Down Expand Up @@ -60,8 +60,8 @@ public static Schema commitAvroSchemaExample(String projectId, String schemaId,

System.out.println("Committed a schema using an Avro schema:\n" + schema);
return schema;
} catch (AlreadyExistsException e) {
System.out.println(schemaName + "already exists.");
} catch (NotFoundException e) {
System.out.println(schemaName + "does not exist.");
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// [START pubsub_commit_proto_schema]

import com.google.api.gax.rpc.AlreadyExistsException;
import com.google.api.gax.rpc.NotFoundException;
import com.google.cloud.pubsub.v1.SchemaServiceClient;
import com.google.pubsub.v1.ProjectName;
import com.google.pubsub.v1.Schema;
Expand Down Expand Up @@ -60,8 +60,8 @@ public static Schema commitProtoSchemaExample(String projectId, String schemaId,

System.out.println("Committed a schema using a protobuf schema:\n" + schema);
return schema;
} catch (AlreadyExistsException e) {
System.out.println(schemaName + "already exists.");
} catch (NotFoundException e) {
System.out.println(schemaName + "does not exist.");
return null;
}
}
Expand Down