/** * Get the profile id for the given program, given arguments for a run. All non-workflow program types will use the * native profile. Workflow program types will use whatever profile is specified in its arguments, or the native * profile if none is specified. * * @param programId program to get the profile for * @param args arguments for a program run * @return the profile id for the program run */ public static ProfileId getProfileIdForProgram(ProgramId programId, Map<String, String> args) { if (isProfileAllowed(programId.getType())) { return getProfileIdFromArgs(programId.getNamespaceId(), args).orElse(ProfileId.NATIVE); } return ProfileId.NATIVE; }
return; if (SystemArguments.isProfileAllowed(programId.getType())) { collectProgramProfileMetadata(programId, null, updates);