This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new FunctionsInvokeClient(authProvider).withCloseable { FunctionsInvokeClient client -> | |
| client.setEndpoint(endpoint) | |
| LOGGER.info("Initial read to establish record count..."); | |
| InvokeFunctionRequest readSizeRequest = InvokeFunctionRequest.builder().functionId(readId) | |
| .invokeFunctionBody(StreamUtils.createByteArrayInputStream()).build() | |
| InvokeFunctionResponse readSizeResponse = client.invokeFunction(readSizeRequest) | |
| List parsedSizeResponse = new JsonSlurper().parse(readSizeResponse.getInputStream()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10:57:00.499 [main] INFO com.oracle.bmc.functions.FunctionsInvokeClient - Setting endpoint to https://xicciwch3fq.us-phoenix-1.functions.oci.oraclecloud.com | |
| 10:57:00.530 [main] INFO codes.recursive.Main - Initial read to establish record count... | |
| 10:57:00.568 [main] DEBUG com.oracle.bmc.http.internal.RestClient - Generated request ID: 632C1FD289144269BB73886C67914A1C | |
| 10:57:00.910 [main] INFO com.oracle.bmc.ClientRuntime - Using SDK: Oracle-JavaSDK/1.4.1-preview1-SNAPSHOT | |
| 10:57:00.910 [main] INFO com.oracle.bmc.ClientRuntime - User agent set to: Oracle-JavaSDK/1.4.1-preview1-SNAPSHOT (Mac OS X/10.14.4; Java/1.8.0_201; Java HotSpot(TM) 64-Bit Server VM/25.201-b09) | |
| 10:57:01.587 [main] INFO codes.recursive.Main - Before insert there are currently 0 records in the table... | |
| 10:57:01.587 [main] INFO codes.recursive.Main - Invoking normal insert with Sync Client... | |
| 10:57:01.592 [main] DEBUG com.oracle.bmc.http.internal.RestClient - Generated request ID: FA72157DC85D47DABDDC21AD5A41BDB0 | |
| [insert:[rowsAffected:1], compl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new FunctionsInvokeAsyncClient(authProvider).withCloseable { asyncClient -> | |
| asyncClient.setEndpoint(endpoint) | |
| LOGGER.info("Initial read to establish record count..."); | |
| AsyncHandler<InvokeFunctionRequest, InvokeFunctionResponse> readSizeRequestHandler = new AsyncHandler() { | |
| @Override | |
| void onSuccess(Object request, Object response) { | |
| List parsedSizeResponse = new JsonSlurper().parse(response.getInputStream()) | |
| LOGGER.info("Before slow insert there are currently ${parsedSizeResponse.size()} records in the table..."); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 11:08:38.019 [main] INFO codes.recursive.Main - Initial read to establish record count... | |
| 11:08:38.073 [main] DEBUG com.oracle.bmc.http.internal.RestClient - Generated request ID: D89086DE0F09469891996EAAD718224D | |
| 11:08:38.353 [main] INFO codes.recursive.Main - Invoking slow insert with Async Client... | |
| 11:08:38.361 [main] DEBUG com.oracle.bmc.http.internal.RestClient - Generated request ID: 7AE5A846B076443680805070DF9C68B8 | |
| 11:08:38.362 [main] INFO codes.recursive.Main - Keeping thread alive so insert response is logged. Waiting 10 seconds... | |
| 11:08:38.478 [jersey-client-async-executor-1] INFO com.oracle.bmc.ClientRuntime - Using SDK: Oracle-JavaSDK/1.4.1-preview1-SNAPSHOT | |
| 11:08:38.478 [jersey-client-async-executor-1] INFO com.oracle.bmc.ClientRuntime - User agent set to: Oracle-JavaSDK/1.4.1-preview1-SNAPSHOT (Mac OS X/10.14.4; Java/1.8.0_201; Java HotSpot(TM) 64-Bit Server VM/25.201-b09) | |
| 11:08:40.096 [jersey-client-async-executor-0] INFO codes.recursive.Main - Before slow insert there are currently 1 records i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mn create-app metadata-demo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package metadata.demo; | |
| import io.micronaut.http.annotation.Controller; | |
| import io.micronaut.http.annotation.Get; | |
| import io.micronaut.http.HttpStatus; | |
| @Controller("/metadata") | |
| public class MetadataController { | |
| @Get("/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| micronaut: | |
| application: | |
| name: metadata | |
| test: 'i am running on OCI!' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| micronaut: | |
| application: | |
| name: metadata-demo | |
| test: 'default value' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Controller("/metadata") | |
| public class MetadataController { | |
| String testConfigValue = null; | |
| @Inject | |
| MetadataController( @Property(name="test") String test ){ | |
| this.testConfigValue = test; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Controller("/metadata") | |
| public class MetadataController { | |
| final static Logger logger = LoggerFactory.getLogger(MetadataController.class); | |
| private ServiceInstance serviceInstance; | |
| @Inject ApplicationContext applicationContext; | |
| String testConfigValue = null; | |
| @Inject | |
| MetadataController( @Property(name="test") String test ){ |