Gets the id of the instance that owns this AppProfile.
18540
@SuppressWarnings("WeakerAccess")
  public String getInstanceId() {
    AppProfileName fullName =
        Verify.verifyNotNull(AppProfileName.parse(proto.getName()), "Name can never be null");

    //noinspection ConstantConditions
    return fullName.getInstance();
  }
442924
@SuppressWarnings("WeakerAccess")
  public ApiFuture<AppProfile> getAppProfileAsync(String instanceId, String appProfileId) {
    String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId);

    GetAppProfileRequest request =
        GetAppProfileRequest.newBuilder().setName(name.toString()).build();

    return ApiFutures.transform(
        stub.getAppProfileCallable().futureCall(request),
        new ApiFunction<com.google.bigtable.admin.v2.AppProfile, AppProfile>() {
          @Override
          public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) {
            return AppProfile.fromProto(proto);
          }
        },
        MoreExecutors.directExecutor());
  }
827884
def household_id(self):
        
        # Since this does not change over time (?) check whether we already
        # know the answer. If so, return the cached version
        if self._household_id is None:
            self._household_id = self.deviceProperties.GetHouseholdID()[
                'CurrentHouseholdID']
        return self._household_id
1012352
public Instance getInstance(final String my_instance_id) {
    // [START instance_admin_client_get_instance]
    final String instanceId = my_instance_id;
    Instance ins = instanceAdminClient.getInstance(instanceId);
    // [END instance_admin_client_get_instance]
    return ins;
  }
1052383
@SuppressWarnings("WeakerAccess")
  public ApiFuture<Void> deleteAppProfileAsync(String instanceId, String appProfileId) {
    String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId);
    DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build();

    return ApiFutures.transform(
        stub.deleteAppProfileCallable().futureCall(request),
        new ApiFunction<Empty, Void>() {
          @Override
          public Void apply(Empty input) {
            return null;
          }
        },
        MoreExecutors.directExecutor());
  }
412456
@SuppressWarnings("WeakerAccess")
  public String getInstanceId() {
    // Constructor ensures that name is not null
    ClusterName fullName =
        Verify.verifyNotNull(ClusterName.parse(stateProto.getName()), "Name can never be null");
    //noinspection ConstantConditions
    return fullName.getInstance();
  }
473531
private AppIdentity getAppIdentity(ApiConfiguration apiConfig) {
		final String applicationName = apiConfig.getApplication();

		if (applicationName == null)
			return null;

		// If there's no record create it.
		if (!applicationIdentityCache.containsKey(applicationName)) {
			applicationIdentityCache.put(applicationName, new AppIdentityState());
		}

		final AppIdentityState state = applicationIdentityCache.get(applicationName);
		final long now = System.currentTimeMillis();

		if ((state.lastModified() + FIVE_MINUTES_MILLIS) < now) {
			state.touch();
			try {
				final AppIdentity identity = identifyApp(apiConfig);
				applicationIdentityCache.put(applicationName, state.updateAppIdentity(identity));

				LOGGER.debug("Application identity: {}", identity);

			} catch (Throwable t) {
				LOGGER.info("Unable to determine application identity", t);
			}
		}

		return applicationIdentityCache.get(apiConfig.getApplication()).getAppIdentity();
	}
388002
public String getProfileId() {
        return (data != null && data.payload != null) ? data.payload.profileId : null;
    }
52619
def show(cls, app_id):
        
        conn = Qubole.agent()
        return conn.get(cls.element_path(app_id))
645382
public static String getAppId() {
        if (appId != null)
            return appId;
        appId = PropertyManager.getProperty(PropertyNames.MDW_APP_ID);
        if (appId == null) // try legacy property
            appId = PropertyManager.getProperty("mdw.application.name");
        if (appId == null)
            return "Unknown";
        return appId;
    }
1050843
def get_instance_id():
    
    log = logging.getLogger(mod_logger + '.get_instance_id')

    # Exit if not running on AWS
    if not is_aws():
        log.info('This machine is not running in AWS, exiting...')
        return

    instance_id_url = metadata_url + 'instance-id'
    try:
        response = urllib.urlopen(instance_id_url)
    except(IOError, OSError) as ex:
        msg = 'Unable to query URL to get instance ID: {u}\n{e}'. \
            format(u=instance_id_url, e=ex)
        log.error(msg)
        return

    # Check the code
    if response.getcode() != 200:
        msg = 'There was a problem querying url: {u}, returned code: {c}, unable to get the instance-id'.format(
                u=instance_id_url, c=response.getcode())
        log.error(msg)
        return
    instance_id = response.read()
    return instance_id
961879
private String getSubProcessInstanceId(String instanceId) {
        int beg = instanceId.indexOf("/");

        if (beg > -1 && beg + 1 < instanceId.length()) {
            return instanceId.substring(beg + 1);
        }

        return "";
    }
952073
public static String getKeyForAppid(String key, String appIdentifier) {
		if (StringUtils.isBlank(key) || StringUtils.isBlank(appIdentifier)) {
			return key;
		}
		if (isSharedAppid(appIdentifier)) {
			// app is sharing a table with other apps, key is composite "appid_key"
			return keyPrefix(appIdentifier) + key;
		} else {
			return key;
		}
	}
101281
public InstanceId getInstanceId()
    {
        if (m_instanceId == null)
        {
            try
            {
                byte[] data =
                    m_zk.getData(CoreZK.instance_id, false, null);
                JSONObject idJSON = new JSONObject(new String(data, "UTF-8"));
                m_instanceId = new InstanceId(idJSON.getInt("coord"),
                        idJSON.getLong("timestamp"));

            }
            catch (Exception e)
            {
                String msg = "Unable to get instance ID info from " + CoreZK.instance_id;
                hostLog.error(msg);
                throw new RuntimeException(msg, e);
            }
        }
        return m_instanceId;
    }
633091
def from_current(cls):
        
        if properties.application_id is None:
            raise context.ValueError("Not running inside a container")

        return cls(properties.appmaster_address,
                   properties.application_id,
                   security=Security.from_default())
854711
private long getProcessInstanceId(String instanceId) throws NumberFormatException {
        int endIndx = instanceId.indexOf("/");

        if (endIndx > -1) {
            return Long.parseLong(instanceId.substring(0, endIndx));
        }

        return Long.parseLong(instanceId);

    }
772007
public static String getRegistrationId(Context context) {
        final SharedPreferences prefs = getGCMPreferences(context);
        String registrationId = prefs.getString(PROPERTY_REG_ID, "");
        // check if app was updated; if so, it must clear registration id to
        // avoid a race condition if GCM sends a message
        int oldVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
        int newVersion = getAppVersion(context);
        if (oldVersion != Integer.MIN_VALUE && oldVersion != newVersion) {
            Log.v(TAG, "App version changed from " + oldVersion + " to " +
                    newVersion + "; resetting registration id");
            clearRegistrationId(context);
            registrationId = "";
        }
        return registrationId;
    }