Closed cjhoon1014 closed 3 years ago
I didn't get it. async method does not work, until you either .block
to wait on it, or use e.g. .flatMap
or .map
to concat it with other operations.
I didn't get it. async method does not work, until you either
.block
to wait on it, or use e.g..flatMap
or.map
to concat it with other operations.
i was don't know how to use async method. okay, i will try this.
thanks.
@cjhoon1014 Please note that the new SDK (2.x.x) switched to Reactor for async. https://aka.ms/azsdk/java/mgmt
If you only started using the Azure Java management SDK, you might be better start with the new SDK.
@weidongxu-microsoft thank you so much. i will try this too. Thanks.
Query/Question I'm using Azure JAVA SDK. I try to Azure VirtualMacine runShellScriptAsync function like under this :
`String subscription = "something..."; String resourceGroupName= "something..."; String vmName= "something...";
VirtualMachine linuxVM = AzureUtils.azureResourceManager.virtualMachines().getById("/subscriptions/"+subscription+"/resourceGroups/"+resourceGroupName+"/providers/Microsoft.Compute/virtualMachines/"+vmName);
List cmdList = new ArrayList<>();
cmdList.add("sudo apt-get update");
cmdList.add("sudo apt-get install $name");
List parameters = new ArrayList();
RunCommandInputParameter arg1 = new RunCommandInputParameter();
arg1.withName("name");
arg1.withValue("git");
parameters.add(arg1);
linuxVM.runShellScriptAsync(cmdList, parameters);`
but this code not working... (but linuxVM.runShellScript() function is working..) why async function code is not working? could you check or let me know solution, please... (or something sample code please!)
Why is this not a Bug or a feature Request? is only async function not working.
Setup (please complete the following information if applicable):
SDK Version:
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report