repo
stringlengths
1
191
file
stringlengths
23
351
code
stringlengths
0
5.32M
file_length
int64
0
5.32M
avg_line_length
float64
0
2.9k
max_line_length
int64
0
288k
extension_type
stringclasses
1 value
null
NearPMSW-main/baseline/logging/YCSB2/solr7/src/test/java/site/ycsb/db/solr7/SolrClientCloudTest.java
/** * Copyright (c) 2020 YCSB contributors. All rights reserved. * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.solr7; import site.ycsb.DB; import org.junit.After; import java.util.Properties; import static org.junit.Assume.assumeNoException; public class SolrClientCloudTest extends SolrClientBaseTest { private SolrClient instance; @After public void tearDown() throws Exception { try { if(instance != null) { instance.cleanup(); } } finally { super.tearDown(); } } @Override protected DB getDB(Properties props) { instance = new SolrClient(); props.setProperty("solr.cloud", "true"); props.setProperty("solr.zookeeper.hosts", miniSolrCloudCluster.getSolrClient().getZkHost()); instance.setProperties(props); try { instance.init(); } catch (Exception error) { assumeNoException(error); } return instance; } }
1,498
25.298246
96
java
null
NearPMSW-main/baseline/logging/YCSB2/solr7/src/test/java/site/ycsb/db/solr7/SolrClientTest.java
/** * Copyright (c) 2020 YCSB contributors. All rights reserved. * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.solr7; import site.ycsb.DB; import org.apache.solr.client.solrj.embedded.JettySolrRunner; import org.junit.After; import java.util.Properties; import static org.junit.Assume.assumeNoException; public class SolrClientTest extends SolrClientBaseTest { private SolrClient instance; @After public void tearDown() throws Exception { try { if(instance != null) { instance.cleanup(); } } finally { super.tearDown(); } } @Override protected DB getDB(Properties props) { instance = new SolrClient(); // Use the first Solr server in the cluster. // Doesn't matter if there are more since requests will be forwarded properly by Solr. JettySolrRunner jettySolrRunner = miniSolrCloudCluster.getJettySolrRunners().get(0); String solrBaseUrl = String.format("http://localhost:%s%s", jettySolrRunner.getLocalPort(), jettySolrRunner.getBaseUrl()); props.setProperty("solr.base.url", solrBaseUrl); instance.setProperties(props); try { instance.init(); } catch (Exception error) { assumeNoException(error); } return instance; } }
1,829
28.047619
95
java
null
NearPMSW-main/baseline/logging/YCSB2/solr7/src/test/java/site/ycsb/db/solr7/SolrClientBaseTest.java
/** * Copyright (c) 2020 YCSB contributors. All rights reserved. * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.solr7; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import org.apache.solr.client.solrj.embedded.JettyConfig; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.cloud.MiniSolrCloudCluster; import org.apache.solr.common.util.NamedList; import org.junit.*; import java.io.File; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Properties; import java.util.Set; import java.util.Vector; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; public abstract class SolrClientBaseTest { protected static MiniSolrCloudCluster miniSolrCloudCluster; private DB instance; private final static HashMap<String, ByteIterator> MOCK_DATA; protected final static String MOCK_TABLE = "ycsb"; private final static String MOCK_KEY0 = "0"; private final static String MOCK_KEY1 = "1"; private final static int NUM_RECORDS = 10; private final static String FIELD_PREFIX = CoreWorkload.FIELD_NAME_PREFIX_DEFAULT; static { MOCK_DATA = new HashMap<>(NUM_RECORDS); for (int i = 0; i < NUM_RECORDS; i++) { MOCK_DATA.put(FIELD_PREFIX + i, new StringByteIterator("value" + i)); } } @BeforeClass public static void onlyOnce() throws Exception { Path miniSolrCloudClusterTempDirectory = Files.createTempDirectory("miniSolrCloudCluster"); miniSolrCloudClusterTempDirectory.toFile().deleteOnExit(); miniSolrCloudCluster = new MiniSolrCloudCluster(1, miniSolrCloudClusterTempDirectory, JettyConfig.builder().build()); // Upload Solr configuration URL configDir = SolrClientBaseTest.class.getClassLoader().getResource("solr_config"); assertNotNull(configDir); miniSolrCloudCluster.uploadConfigSet(Paths.get(configDir.toURI()), MOCK_TABLE); } @AfterClass public static void destroy() throws Exception { if(miniSolrCloudCluster != null) { miniSolrCloudCluster.shutdown(); } } @Before public void setup() throws Exception { CollectionAdminRequest.createCollection(MOCK_TABLE, MOCK_TABLE, 1, 1) .withProperty("solr.directoryFactory", "solr.StandardDirectoryFactory") .process(miniSolrCloudCluster.getSolrClient()); miniSolrCloudCluster.waitForActiveCollection(MOCK_TABLE, 1, 1); Thread.sleep(1000); instance = getDB(); } @After public void tearDown() throws Exception { if(miniSolrCloudCluster != null) { CollectionAdminRequest.deleteCollection(MOCK_TABLE) .processAndWait(miniSolrCloudCluster.getSolrClient(), 60); Thread.sleep(1000); } } @Test public void testInsert() throws Exception { Status result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); assertEquals(Status.OK, result); } @Test public void testDelete() throws Exception { Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); assertEquals(Status.OK, result); } @Test public void testRead() throws Exception { Set<String> fields = MOCK_DATA.keySet(); HashMap<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); Status result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); assertEquals(Status.OK, result); } @Test public void testUpdate() throws Exception { HashMap<String, ByteIterator> newValues = new HashMap<>(NUM_RECORDS); for (int i = 0; i < NUM_RECORDS; i++) { newValues.put(FIELD_PREFIX + i, new StringByteIterator("newvalue" + i)); } Status result = instance.update(MOCK_TABLE, MOCK_KEY1, newValues); assertEquals(Status.OK, result); //validate that the values changed HashMap<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); instance.read(MOCK_TABLE, MOCK_KEY1, MOCK_DATA.keySet(), resultParam); for (int i = 0; i < NUM_RECORDS; i++) { assertEquals("newvalue" + i, resultParam.get(FIELD_PREFIX + i).toString()); } } @Test public void testScan() throws Exception { Set<String> fields = MOCK_DATA.keySet(); Vector<HashMap<String, ByteIterator>> resultParam = new Vector<>(NUM_RECORDS); Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, NUM_RECORDS, fields, resultParam); assertEquals(Status.OK, result); } /** * Gets the test DB. * * @return The test DB. */ protected DB getDB() { return getDB(new Properties()); } /** * Gets the test DB. * * @param props * Properties to pass to the client. * @return The test DB. */ protected abstract DB getDB(Properties props); }
5,391
31.287425
121
java
null
NearPMSW-main/baseline/logging/YCSB2/solr7/src/main/java/site/ycsb/db/solr7/package-info.java
/* * Copyright (c) 2020 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for * <a href="http://lucene.apache.org/solr/">Solr</a>. */ package site.ycsb.db.solr7;
774
31.291667
70
java
null
NearPMSW-main/baseline/logging/YCSB2/solr7/src/main/java/site/ycsb/db/solr7/SolrClient.java
/** * Copyright (c) 2020 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.solr7; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.impl.CloudSolrClient; import org.apache.solr.client.solrj.impl.HttpClientUtil; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.Krb5HttpClientBuilder; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.client.solrj.response.UpdateResponse; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; import java.io.IOException; import java.util.*; import java.util.Map.Entry; /** * Solr client for YCSB framework. * * <p> * Default properties to set: * </p> * <ul> * See README.md * </ul> * */ public class SolrClient extends DB { public static final String DEFAULT_CLOUD_MODE = "false"; public static final String DEFAULT_BATCH_MODE = "false"; public static final String DEFAULT_ZOOKEEPER_HOSTS = "localhost:2181"; public static final String DEFAULT_SOLR_BASE_URL = "http://localhost:8983/solr"; public static final String DEFAULT_COMMIT_WITHIN_TIME = "1000"; private org.apache.solr.client.solrj.SolrClient client; private Integer commitTime; private Boolean batchMode; /** * Initialize any state for this DB. Called once per DB instance; there is one DB instance per * client thread. */ @Override public void init() throws DBException { Properties props = getProperties(); commitTime = Integer .parseInt(props.getProperty("solr.commit.within.time", DEFAULT_COMMIT_WITHIN_TIME)); batchMode = Boolean.parseBoolean(props.getProperty("solr.batch.mode", DEFAULT_BATCH_MODE)); String jaasConfPath = props.getProperty("solr.jaas.conf.path"); if(jaasConfPath != null) { System.setProperty("java.security.auth.login.config", jaasConfPath); HttpClientUtil.setHttpClientBuilder(new Krb5HttpClientBuilder().getHttpClientBuilder(Optional.empty())); } // Check if Solr cluster is running in SolrCloud or Stand-alone mode Boolean cloudMode = Boolean.parseBoolean(props.getProperty("solr.cloud", DEFAULT_CLOUD_MODE)); System.err.println("Solr Cloud Mode = " + cloudMode); if (cloudMode) { System.err.println("Solr Zookeeper Remote Hosts = " + props.getProperty("solr.zookeeper.hosts", DEFAULT_ZOOKEEPER_HOSTS)); client = new CloudSolrClient.Builder().withZkHost( Arrays.asList(props.getProperty("solr.zookeeper.hosts", DEFAULT_ZOOKEEPER_HOSTS).split(","))).build(); } else { client = new HttpSolrClient.Builder(props.getProperty("solr.base.url", DEFAULT_SOLR_BASE_URL)).build(); } } @Override public void cleanup() throws DBException { try { client.close(); } catch (IOException e) { throw new DBException(e); } } /** * Insert a record in the database. Any field/value pairs in the specified values HashMap will be * written into the record with the specified record key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error. See this class's description for a * discussion of error codes. */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { SolrInputDocument doc = new SolrInputDocument(); doc.addField("id", key); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { doc.addField(entry.getKey(), entry.getValue()); } UpdateResponse response; if (batchMode) { response = client.add(table, doc, commitTime); } else { response = client.add(table, doc); client.commit(table); } return checkStatus(response.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; } /** * Delete a record from the database. * * @param table * The name of the table * @param key * The record key of the record to delete. * @return Zero on success, a non-zero error code on error. See this class's description for a * discussion of error codes. */ @Override public Status delete(String table, String key) { try { UpdateResponse response; if (batchMode) { response = client.deleteById(table, key, commitTime); } else { response = client.deleteById(table, key); client.commit(table); } return checkStatus(response.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; } /** * Read a record from the database. Each field/value pair from the result will be stored in a * HashMap. * * @param table * The name of the table * @param key * The record key of the record to read. * @param fields * The list of fields to read, or null for all of them * @param result * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error or "not found". */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { Boolean returnFields = false; String[] fieldList = null; if (fields != null) { returnFields = true; fieldList = fields.toArray(new String[fields.size()]); } SolrQuery query = new SolrQuery(); query.setQuery("id:" + key); if (returnFields) { query.setFields(fieldList); } final QueryResponse response = client.query(table, query); SolrDocumentList results = response.getResults(); if ((results != null) && (results.getNumFound() > 0)) { for (String field : results.get(0).getFieldNames()) { result.put(field, new StringByteIterator(String.valueOf(results.get(0).getFirstValue(field)))); } } return checkStatus(response.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; } /** * Update a record in the database. Any field/value pairs in the specified values HashMap will be * written into the record with the specified record key, overwriting any existing values with the * same field name. * * @param table * The name of the table * @param key * The record key of the record to write. * @param values * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error. See this class's description for a * discussion of error codes. */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { SolrInputDocument updatedDoc = new SolrInputDocument(); updatedDoc.addField("id", key); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { updatedDoc.addField(entry.getKey(), Collections.singletonMap("set", entry.getValue())); } UpdateResponse writeResponse; if (batchMode) { writeResponse = client.add(table, updatedDoc, commitTime); } else { writeResponse = client.add(table, updatedDoc); client.commit(table); } return checkStatus(writeResponse.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; } /** * Perform a range scan for a set of records in the database. Each field/value pair from the * result will be stored in a HashMap. * * @param table * The name of the table * @param startkey * The record key of the first record to read. * @param recordcount * The number of records to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return Zero on success, a non-zero error code on error. See this class's description for a * discussion of error codes. */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { Boolean returnFields = false; String[] fieldList = null; if (fields != null) { returnFields = true; fieldList = fields.toArray(new String[fields.size()]); } SolrQuery query = new SolrQuery(); query.setQuery("*:*"); query.setParam("fq", "id:[ " + startkey + " TO * ]"); if (returnFields) { query.setFields(fieldList); } query.setRows(recordcount); final QueryResponse response = client.query(table, query); SolrDocumentList results = response.getResults(); HashMap<String, ByteIterator> entry; for (SolrDocument hit : results) { entry = new HashMap<>((int) results.getNumFound()); for (String field : hit.getFieldNames()) { entry.put(field, new StringByteIterator(String.valueOf(hit.getFirstValue(field)))); } result.add(entry); } return checkStatus(response.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; } private Status checkStatus(int status) { Status responseStatus; switch (status) { case 0: responseStatus = Status.OK; break; case 400: responseStatus = Status.BAD_REQUEST; break; case 403: responseStatus = Status.FORBIDDEN; break; case 404: responseStatus = Status.NOT_FOUND; break; case 500: responseStatus = Status.ERROR; break; case 503: responseStatus = Status.SERVICE_UNAVAILABLE; break; default: responseStatus = Status.UNEXPECTED_STATE; break; } return responseStatus; } }
11,172
32.653614
110
java
null
NearPMSW-main/baseline/logging/YCSB2/postgrenosql/src/test/java/site/ycsb/postgrenosql/PostgreNoSQLDBClientTest.java
/* * Copyright 2017 YCSB Contributors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.postgrenosql; import site.ycsb.*; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.postgresql.Driver; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.*; import org.postgresql.util.PSQLException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertThat; import static org.junit.Assume.assumeNoException; /** * PostgreNoSQL test client for YCSB framework. */ public class PostgreNoSQLDBClientTest { private static final Logger LOG = LoggerFactory.getLogger(PostgreNoSQLDBClientTest.class); /** The default port for PostgreSQL. */ private static final int DEFAULT_PORT = 5432; private static final String DATABASE_NAME = "test"; private static final String DEFAULT_USER = "postgres"; private static final String DEFAULT_PWD = "postgres"; /** The properties settings */ private static final String HOST_NAME = "localhost"; private static final String TEST_DB_URL = "jdbc:postgresql://" + HOST_NAME + ":" + DEFAULT_PORT + "/" + DATABASE_NAME; private static final String TABLE_NAME = "usertable"; private static final int FIELD_LENGTH = 32; private static final String FIELD_PREFIX = "FIELD"; private static final int NUM_FIELDS = 3; private static Connection postgreSQLConnection = null; private static PostgreNoSQLDBClient postgreNoSQLClient = null; @BeforeClass public static void setUp() { // Check whether postgres is available try (Socket socket = new Socket(HOST_NAME, DEFAULT_PORT)){ assertThat("Socket is not bound.", socket.getLocalPort(), not(-1)); } catch (IOException connectFailed) { assumeNoException("PostgreSQL is not running. Skipping tests.", connectFailed); } Properties props = new Properties(); props.setProperty(PostgreNoSQLDBClient.CONNECTION_URL, TEST_DB_URL); props.setProperty(PostgreNoSQLDBClient.CONNECTION_USER, DEFAULT_USER); props.setProperty(PostgreNoSQLDBClient.CONNECTION_PASSWD, DEFAULT_PWD); props.setProperty("user", DEFAULT_USER); props.setProperty("password", DEFAULT_PWD); props.setProperty(PostgreNoSQLDBClient.JDBC_AUTO_COMMIT, "true"); try{ postgreSQLConnection = new Driver().connect(TEST_DB_URL, props); boolean tableExists = postgreSQLConnection.getMetaData().getTables(null, null, TABLE_NAME, null).next(); assertThat("Table does not exist.", tableExists, not(false)); postgreNoSQLClient = new PostgreNoSQLDBClient(); postgreNoSQLClient.setProperties(props); postgreNoSQLClient.init(); } catch (PSQLException e){ if (e.getSQLState().equals("3D000")){ assumeNoException("Database does not exist. Skipping tests.", e); } } catch (SQLException | DBException e){ LOG.info(e.toString()); } } @AfterClass public static void tearDown(){ } @Test public void insertRead() { String insertKey = "user0"; try{ HashMap<String, ByteIterator> insertMap = new HashMap<>(); HashMap<String, ByteIterator> copiedInsertMap = new HashMap<>(); Set<String> fields = createFieldSet(); for (int i = 0; i < NUM_FIELDS; i++) { byte[] value = new byte[FIELD_LENGTH]; for (int j = 0;j < value.length;j++){ value[j] = (byte)((i+1)*(j+1)); } insertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); copiedInsertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); } Status result = postgreNoSQLClient.insert(TABLE_NAME, insertKey, insertMap); assertThat("Insert did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> readResults = new HashMap<>(); result = postgreNoSQLClient.read(TABLE_NAME, insertKey, fields, readResults); assertThat("Read did not return success (0).", result, is(Status.OK)); for (Map.Entry<String, ByteIterator> entry : readResults.entrySet()) { assertArrayEquals("Read result does not match wrote entries.", entry.getValue().toArray(), copiedInsertMap.get(entry.getKey()).toArray()); } } catch (Exception e){ LOG.info(e.toString()); } } @Test public void insertReadDelete() { String insertKey = "user1"; try{ HashMap<String, ByteIterator> insertMap = new HashMap<>(); HashMap<String, ByteIterator> copiedInsertMap = new HashMap<>(); Set<String> fields = createFieldSet(); for (int i = 0; i < NUM_FIELDS; i++) { byte[] value = new byte[FIELD_LENGTH]; for (int j = 0;j < value.length;j++){ value[j] = (byte)((i+1)*(j+1)); } insertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); copiedInsertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); } Status result = postgreNoSQLClient.insert(TABLE_NAME, insertKey, insertMap); assertThat("Insert did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> readResults = new HashMap<>(); result = postgreNoSQLClient.read(TABLE_NAME, insertKey, fields, readResults); assertThat("Read did not return success (0).", result, is(Status.OK)); for (Map.Entry<String, ByteIterator> entry : readResults.entrySet()) { assertArrayEquals("Read result does not match wrote entries.", entry.getValue().toArray(), copiedInsertMap.get(entry.getKey()).toArray()); } result = postgreNoSQLClient.delete(TABLE_NAME, insertKey); assertThat("Delete did not return success (0).", result, is(Status.OK)); result = postgreNoSQLClient.read(TABLE_NAME, insertKey, fields, readResults); assertThat("Read did not return not found (0).", result, is(Status.NOT_FOUND)); } catch (Exception e){ LOG.info(e.toString()); } } @Test public void insertScan() { int numberOfValuesToInsert = 100; int recordcount = 5; String startKey = "00050"; try{ // create set of fields to scan Set<String> fields = createFieldSet(); // create values to insert for (int i = 0;i < numberOfValuesToInsert;i++){ HashMap<String, ByteIterator> insertMap = new HashMap<>(); for (int j = 0; j < NUM_FIELDS; j++) { byte[] value = new byte[FIELD_LENGTH]; for (int k = 0; k < value.length; k++) { value[k] = (byte) ((j + 1) * (k + 1)); } insertMap.put(FIELD_PREFIX + j, new ByteArrayByteIterator(value)); } postgreNoSQLClient.insert(TABLE_NAME, padded(i, 5), insertMap); } Vector<HashMap<String, ByteIterator>> results = new Vector<HashMap<String, ByteIterator>>(); Status result = postgreNoSQLClient.scan(TABLE_NAME, startKey,recordcount, fields, results); assertThat("Scan did not return success (0).", result, is(Status.OK)); assertThat("Number of results does not match.", results.size(), is(recordcount)); } catch (Exception e){ LOG.info(e.toString()); } } @Test public void insertUpdate(){ String insertKey = "user2"; try{ HashMap<String, ByteIterator> insertMap = new HashMap<>(); HashMap<String, ByteIterator> copiedInsertMap = new HashMap<>(); Set<String> fields = createFieldSet(); for (int i = 0; i < NUM_FIELDS; i++) { byte[] value = new byte[FIELD_LENGTH]; for (int j = 0;j < value.length;j++){ value[j] = (byte)((i+1)*(j+1)); } insertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); copiedInsertMap.put(FIELD_PREFIX + i, new ByteArrayByteIterator(value)); } Status result = postgreNoSQLClient.insert(TABLE_NAME, insertKey, insertMap); assertThat("Insert did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> updateMap = new HashMap<>(); updateMap.put("FIELD0", new ByteArrayByteIterator(new byte[]{99, 99, 99, 99})); result = postgreNoSQLClient.update(TABLE_NAME, insertKey, updateMap); assertThat("Update did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> readResults = new HashMap<>(); result = postgreNoSQLClient.read(TABLE_NAME, insertKey, fields, readResults); assertThat("Read did not return success (0).", result, is(Status.OK)); assertThat("Value was not updated correctly.", readResults.get("FIELD0").toArray(), is(new byte[]{99, 99, 99, 99})); } catch (Exception e){ LOG.info(e.toString()); } } private String padded(int i, int padding) { String result = String.valueOf(i); while (result.length() < padding) { result = "0" + result; } return result; } private Set<String> createFieldSet() { Set<String> fields = new HashSet<>(); for (int j = 0; j < NUM_FIELDS; j++) { fields.add(FIELD_PREFIX + j); } return fields; } }
9,832
35.553903
146
java
null
NearPMSW-main/baseline/logging/YCSB2/postgrenosql/src/main/java/site/ycsb/postgrenosql/package-info.java
/* * Copyright 2017 YCSB Contributors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for PostgreNoSQL client. */ package site.ycsb.postgrenosql;
739
32.636364
70
java
null
NearPMSW-main/baseline/logging/YCSB2/postgrenosql/src/main/java/site/ycsb/postgrenosql/PostgreNoSQLDBClient.java
/* * Copyright 2017 YCSB Contributors. All Rights Reserved. * * CODE IS BASED ON the jdbc-binding JdbcDBClient class. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.postgrenosql; import site.ycsb.*; import org.json.simple.JSONObject; import org.postgresql.Driver; import org.postgresql.util.PGobject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.*; /** * PostgreNoSQL client for YCSB framework. */ public class PostgreNoSQLDBClient extends DB { private static final Logger LOG = LoggerFactory.getLogger(PostgreNoSQLDBClient.class); /** Count the number of times initialized to teardown on the last. */ private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); /** Cache for already prepared statements. */ private static ConcurrentMap<StatementType, PreparedStatement> cachedStatements; /** The driver to get the connection to postgresql. */ private static Driver postgrenosqlDriver; /** The connection to the database. */ private static Connection connection; /** The class to use as the jdbc driver. */ public static final String DRIVER_CLASS = "db.driver"; /** The URL to connect to the database. */ public static final String CONNECTION_URL = "postgrenosql.url"; /** The user name to use to connect to the database. */ public static final String CONNECTION_USER = "postgrenosql.user"; /** The password to use for establishing the connection. */ public static final String CONNECTION_PASSWD = "postgrenosql.passwd"; /** The JDBC connection auto-commit property for the driver. */ public static final String JDBC_AUTO_COMMIT = "postgrenosql.autocommit"; /** The primary key in the user table. */ public static final String PRIMARY_KEY = "YCSB_KEY"; /** The field name prefix in the table. */ public static final String COLUMN_NAME = "YCSB_VALUE"; private static final String DEFAULT_PROP = ""; /** Returns parsed boolean value from the properties if set, otherwise returns defaultVal. */ private static boolean getBoolProperty(Properties props, String key, boolean defaultVal) { String valueStr = props.getProperty(key); if (valueStr != null) { return Boolean.parseBoolean(valueStr); } return defaultVal; } @Override public void init() throws DBException { INIT_COUNT.incrementAndGet(); synchronized (PostgreNoSQLDBClient.class) { if (postgrenosqlDriver != null) { return; } Properties props = getProperties(); String urls = props.getProperty(CONNECTION_URL, DEFAULT_PROP); String user = props.getProperty(CONNECTION_USER, DEFAULT_PROP); String passwd = props.getProperty(CONNECTION_PASSWD, DEFAULT_PROP); boolean autoCommit = getBoolProperty(props, JDBC_AUTO_COMMIT, true); try { Properties tmpProps = new Properties(); tmpProps.setProperty("user", user); tmpProps.setProperty("password", passwd); cachedStatements = new ConcurrentHashMap<>(); postgrenosqlDriver = new Driver(); connection = postgrenosqlDriver.connect(urls, tmpProps); connection.setAutoCommit(autoCommit); } catch (Exception e) { LOG.error("Error during initialization: " + e); } } } @Override public void cleanup() throws DBException { if (INIT_COUNT.decrementAndGet() == 0) { try { cachedStatements.clear(); if (!connection.getAutoCommit()){ connection.commit(); } connection.close(); } catch (SQLException e) { System.err.println("Error in cleanup execution. " + e); } postgrenosqlDriver = null; } } @Override public Status read(String tableName, String key, Set<String> fields, Map<String, ByteIterator> result) { try { StatementType type = new StatementType(StatementType.Type.READ, tableName, fields); PreparedStatement readStatement = cachedStatements.get(type); if (readStatement == null) { readStatement = createAndCacheReadStatement(type); } readStatement.setString(1, key); ResultSet resultSet = readStatement.executeQuery(); if (!resultSet.next()) { resultSet.close(); return Status.NOT_FOUND; } if (result != null) { if (fields == null){ do{ String field = resultSet.getString(2); String value = resultSet.getString(3); result.put(field, new StringByteIterator(value)); }while (resultSet.next()); } else { for (String field : fields) { String value = resultSet.getString(field); result.put(field, new StringByteIterator(value)); } } } resultSet.close(); return Status.OK; } catch (SQLException e) { LOG.error("Error in processing read of table " + tableName + ": " + e); return Status.ERROR; } } @Override public Status scan(String tableName, String startKey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { StatementType type = new StatementType(StatementType.Type.SCAN, tableName, fields); PreparedStatement scanStatement = cachedStatements.get(type); if (scanStatement == null) { scanStatement = createAndCacheScanStatement(type); } scanStatement.setString(1, startKey); scanStatement.setInt(2, recordcount); ResultSet resultSet = scanStatement.executeQuery(); for (int i = 0; i < recordcount && resultSet.next(); i++) { if (result != null && fields != null) { HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); for (String field : fields) { String value = resultSet.getString(field); values.put(field, new StringByteIterator(value)); } result.add(values); } } resultSet.close(); return Status.OK; } catch (SQLException e) { LOG.error("Error in processing scan of table: " + tableName + ": " + e); return Status.ERROR; } } @Override public Status update(String tableName, String key, Map<String, ByteIterator> values) { try{ StatementType type = new StatementType(StatementType.Type.UPDATE, tableName, null); PreparedStatement updateStatement = cachedStatements.get(type); if (updateStatement == null) { updateStatement = createAndCacheUpdateStatement(type); } JSONObject jsonObject = new JSONObject(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { jsonObject.put(entry.getKey(), entry.getValue().toString()); } PGobject object = new PGobject(); object.setType("jsonb"); object.setValue(jsonObject.toJSONString()); updateStatement.setObject(1, object); updateStatement.setString(2, key); int result = updateStatement.executeUpdate(); if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { LOG.error("Error in processing update to table: " + tableName + e); return Status.ERROR; } } @Override public Status insert(String tableName, String key, Map<String, ByteIterator> values) { try{ StatementType type = new StatementType(StatementType.Type.INSERT, tableName, null); PreparedStatement insertStatement = cachedStatements.get(type); if (insertStatement == null) { insertStatement = createAndCacheInsertStatement(type); } JSONObject jsonObject = new JSONObject(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { jsonObject.put(entry.getKey(), entry.getValue().toString()); } PGobject object = new PGobject(); object.setType("jsonb"); object.setValue(jsonObject.toJSONString()); insertStatement.setObject(2, object); insertStatement.setString(1, key); int result = insertStatement.executeUpdate(); if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { LOG.error("Error in processing insert to table: " + tableName + ": " + e); return Status.ERROR; } } @Override public Status delete(String tableName, String key) { try{ StatementType type = new StatementType(StatementType.Type.DELETE, tableName, null); PreparedStatement deleteStatement = cachedStatements.get(type); if (deleteStatement == null) { deleteStatement = createAndCacheDeleteStatement(type); } deleteStatement.setString(1, key); int result = deleteStatement.executeUpdate(); if (result == 1){ return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { LOG.error("Error in processing delete to table: " + tableName + e); return Status.ERROR; } } private PreparedStatement createAndCacheReadStatement(StatementType readType) throws SQLException{ PreparedStatement readStatement = connection.prepareStatement(createReadStatement(readType)); PreparedStatement statement = cachedStatements.putIfAbsent(readType, readStatement); if (statement == null) { return readStatement; } return statement; } private String createReadStatement(StatementType readType){ StringBuilder read = new StringBuilder("SELECT " + PRIMARY_KEY + " AS " + PRIMARY_KEY); if (readType.getFields() == null) { read.append(", (jsonb_each_text(" + COLUMN_NAME + ")).*"); } else { for (String field:readType.getFields()){ read.append(", " + COLUMN_NAME + "->>'" + field + "' AS " + field); } } read.append(" FROM " + readType.getTableName()); read.append(" WHERE "); read.append(PRIMARY_KEY); read.append(" = "); read.append("?"); return read.toString(); } private PreparedStatement createAndCacheScanStatement(StatementType scanType) throws SQLException{ PreparedStatement scanStatement = connection.prepareStatement(createScanStatement(scanType)); PreparedStatement statement = cachedStatements.putIfAbsent(scanType, scanStatement); if (statement == null) { return scanStatement; } return statement; } private String createScanStatement(StatementType scanType){ StringBuilder scan = new StringBuilder("SELECT " + PRIMARY_KEY + " AS " + PRIMARY_KEY); if (scanType.getFields() != null){ for (String field:scanType.getFields()){ scan.append(", " + COLUMN_NAME + "->>'" + field + "' AS " + field); } } scan.append(" FROM " + scanType.getTableName()); scan.append(" WHERE "); scan.append(PRIMARY_KEY); scan.append(" >= ?"); scan.append(" ORDER BY "); scan.append(PRIMARY_KEY); scan.append(" LIMIT ?"); return scan.toString(); } public PreparedStatement createAndCacheUpdateStatement(StatementType updateType) throws SQLException{ PreparedStatement updateStatement = connection.prepareStatement(createUpdateStatement(updateType)); PreparedStatement statement = cachedStatements.putIfAbsent(updateType, updateStatement); if (statement == null) { return updateStatement; } return statement; } private String createUpdateStatement(StatementType updateType){ StringBuilder update = new StringBuilder("UPDATE "); update.append(updateType.getTableName()); update.append(" SET "); update.append(COLUMN_NAME + " = " + COLUMN_NAME); update.append(" || ? "); update.append(" WHERE "); update.append(PRIMARY_KEY); update.append(" = ?"); return update.toString(); } private PreparedStatement createAndCacheInsertStatement(StatementType insertType) throws SQLException{ PreparedStatement insertStatement = connection.prepareStatement(createInsertStatement(insertType)); PreparedStatement statement = cachedStatements.putIfAbsent(insertType, insertStatement); if (statement == null) { return insertStatement; } return statement; } private String createInsertStatement(StatementType insertType){ StringBuilder insert = new StringBuilder("INSERT INTO "); insert.append(insertType.getTableName()); insert.append(" (" + PRIMARY_KEY + "," + COLUMN_NAME + ")"); insert.append(" VALUES(?,?)"); return insert.toString(); } private PreparedStatement createAndCacheDeleteStatement(StatementType deleteType) throws SQLException{ PreparedStatement deleteStatement = connection.prepareStatement(createDeleteStatement(deleteType)); PreparedStatement statement = cachedStatements.putIfAbsent(deleteType, deleteStatement); if (statement == null) { return deleteStatement; } return statement; } private String createDeleteStatement(StatementType deleteType){ StringBuilder delete = new StringBuilder("DELETE FROM "); delete.append(deleteType.getTableName()); delete.append(" WHERE "); delete.append(PRIMARY_KEY); delete.append(" = ?"); return delete.toString(); } }
13,961
33.053659
106
java
null
NearPMSW-main/baseline/logging/YCSB2/postgrenosql/src/main/java/site/ycsb/postgrenosql/StatementType.java
/* * Copyright 2017 YCSB Contributors. All Rights Reserved. * * CODE IS BASED ON the jdbc-binding StatementType class. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.postgrenosql; import java.util.Set; /** * The statement type for the prepared statements. */ public class StatementType { enum Type { INSERT(1), DELETE(2), READ(3), UPDATE(4), SCAN(5); private final int internalType; Type(int type) { internalType = type; } int getHashCode() { final int prime = 31; int result = 1; result = prime * result + internalType; return result; } } private Type type; private String tableName; private Set<String> fields; public StatementType(Type type, String tableName, Set<String> fields) { this.type = type; this.tableName = tableName; this.fields = fields; } public String getTableName() { return tableName; } public Set<String> getFields() { return fields; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.getHashCode()); result = prime * result + ((tableName == null) ? 0 : tableName.hashCode()); result = prime * result + ((fields == null) ? 0 : fields.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } StatementType other = (StatementType) obj; if (type != other.type) { return false; } if (tableName == null) { if (other.tableName != null) { return false; } } else if (!tableName.equals(other.tableName)) { return false; } if (fields == null) { if (other.fields != null) { return false; } }else if (!fields.equals(other.fields)) { return false; } return true; } }
2,546
22.366972
79
java
null
NearPMSW-main/baseline/logging/YCSB2/hbase1/src/test/java/site/ycsb/db/hbase1/HBaseClient1Test.java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.hbase1; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY_DEFAULT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.measurements.Measurements; import site.ycsb.workloads.CoreWorkload; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.util.Bytes; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Vector; /** * Integration tests for the YCSB HBase 1 client, using an HBase minicluster. */ public class HBaseClient1Test { private final static String COLUMN_FAMILY = "cf"; private static HBaseTestingUtility testingUtil; private HBaseClient1 client; private Table table = null; private String tableName; private static boolean isWindows() { final String os = System.getProperty("os.name"); return os.startsWith("Windows"); } /** * Creates a mini-cluster for use in these tests. * * This is a heavy-weight operation, so invoked only once for the test class. */ @BeforeClass public static void setUpClass() throws Exception { // Minicluster setup fails on Windows with an UnsatisfiedLinkError. // Skip if windows. assumeTrue(!isWindows()); testingUtil = HBaseTestingUtility.createLocalHTU(); testingUtil.startMiniCluster(); } /** * Tears down mini-cluster. */ @AfterClass public static void tearDownClass() throws Exception { if (testingUtil != null) { testingUtil.shutdownMiniCluster(); } } /** * Sets up the mini-cluster for testing. * * We re-create the table for each test. */ @Before public void setUp() throws Exception { client = new HBaseClient1(); client.setConfiguration(new Configuration(testingUtil.getConfiguration())); Properties p = new Properties(); p.setProperty("columnfamily", COLUMN_FAMILY); Measurements.setProperties(p); final CoreWorkload workload = new CoreWorkload(); workload.init(p); tableName = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); table = testingUtil.createTable(TableName.valueOf(tableName), Bytes.toBytes(COLUMN_FAMILY)); client.setProperties(p); client.init(); } @After public void tearDown() throws Exception { table.close(); testingUtil.deleteTable(tableName); } @Test public void testRead() throws Exception { final String rowKey = "row1"; final Put p = new Put(Bytes.toBytes(rowKey)); p.addColumn(Bytes.toBytes(COLUMN_FAMILY), Bytes.toBytes("column1"), Bytes.toBytes("value1")); p.addColumn(Bytes.toBytes(COLUMN_FAMILY), Bytes.toBytes("column2"), Bytes.toBytes("value2")); table.put(p); final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); final Status status = client.read(tableName, rowKey, null, result); assertEquals(Status.OK, status); assertEquals(2, result.size()); assertEquals("value1", result.get("column1").toString()); assertEquals("value2", result.get("column2").toString()); } @Test public void testReadMissingRow() throws Exception { final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); final Status status = client.read(tableName, "Missing row", null, result); assertEquals(Status.NOT_FOUND, status); assertEquals(0, result.size()); } @Test public void testScan() throws Exception { // Fill with data final String colStr = "row_number"; final byte[] col = Bytes.toBytes(colStr); final int n = 10; final List<Put> puts = new ArrayList<Put>(n); for(int i = 0; i < n; i++) { final byte[] key = Bytes.toBytes(String.format("%05d", i)); final byte[] value = java.nio.ByteBuffer.allocate(4).putInt(i).array(); final Put p = new Put(key); p.addColumn(Bytes.toBytes(COLUMN_FAMILY), col, value); puts.add(p); } table.put(puts); // Test final Vector<HashMap<String, ByteIterator>> result = new Vector<HashMap<String, ByteIterator>>(); // Scan 5 records, skipping the first client.scan(tableName, "00001", 5, null, result); assertEquals(5, result.size()); for(int i = 0; i < 5; i++) { final HashMap<String, ByteIterator> row = result.get(i); assertEquals(1, row.size()); assertTrue(row.containsKey(colStr)); final byte[] bytes = row.get(colStr).toArray(); final ByteBuffer buf = ByteBuffer.wrap(bytes); final int rowNum = buf.getInt(); assertEquals(i + 1, rowNum); } } @Test public void testUpdate() throws Exception{ final String key = "key"; final HashMap<String, String> input = new HashMap<String, String>(); input.put("column1", "value1"); input.put("column2", "value2"); final Status status = client.insert(tableName, key, StringByteIterator.getByteIteratorMap(input)); assertEquals(Status.OK, status); // Verify result final Get get = new Get(Bytes.toBytes(key)); final Result result = this.table.get(get); assertFalse(result.isEmpty()); assertEquals(2, result.size()); for(final java.util.Map.Entry<String, String> entry : input.entrySet()) { assertEquals(entry.getValue(), new String(result.getValue(Bytes.toBytes(COLUMN_FAMILY), Bytes.toBytes(entry.getKey())))); } } @Test @Ignore("Not yet implemented") public void testDelete() { fail("Not yet implemented"); } }
6,848
31.004673
102
java
null
NearPMSW-main/baseline/logging/YCSB2/hbase1/src/main/java/site/ycsb/db/hbase1/package-info.java
/* * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://hbase.apache.org/">HBase</a> * using the HBase 1 shaded API. */ package site.ycsb.db.hbase1;
795
32.166667
70
java
null
NearPMSW-main/baseline/logging/YCSB2/hbase1/src/main/java/site/ycsb/db/hbase1/HBaseClient1.java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.hbase1; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.measurements.Measurements; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.BufferedMutator; import org.apache.hadoop.hbase.client.BufferedMutatorParams; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.filter.PageFilter; import org.apache.hadoop.hbase.util.Bytes; import java.io.IOException; import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Vector; import java.util.concurrent.atomic.AtomicInteger; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY_DEFAULT; /** * HBase 1 client for YCSB framework. * * Intended for use with HBase's shaded client. */ public class HBaseClient1 extends site.ycsb.DB { private static final AtomicInteger THREAD_COUNT = new AtomicInteger(0); private Configuration config = HBaseConfiguration.create(); private boolean debug = false; private String tableName = ""; /** * A Cluster Connection instance that is shared by all running ycsb threads. * Needs to be initialized late so we pick up command-line configs if any. * To ensure one instance only in a multi-threaded context, guard access * with a 'lock' object. * @See #CONNECTION_LOCK. */ private static Connection connection = null; // Depending on the value of clientSideBuffering, either bufferedMutator // (clientSideBuffering) or currentTable (!clientSideBuffering) will be used. private Table currentTable = null; private BufferedMutator bufferedMutator = null; private String columnFamily = ""; private byte[] columnFamilyBytes; /** * Durability to use for puts and deletes. */ private Durability durability = Durability.USE_DEFAULT; /** Whether or not a page filter should be used to limit scan length. */ private boolean usePageFilter = true; /** * If true, buffer mutations on the client. This is the default behavior for * HBaseClient. For measuring insert/update/delete latencies, client side * buffering should be disabled. */ private boolean clientSideBuffering = false; private long writeBufferSize = 1024 * 1024 * 12; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { if ("true" .equals(getProperties().getProperty("clientbuffering", "false"))) { this.clientSideBuffering = true; } if (getProperties().containsKey("writebuffersize")) { writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize")); } if (getProperties().getProperty("durability") != null) { this.durability = Durability.valueOf(getProperties().getProperty("durability")); } if ("kerberos".equalsIgnoreCase(config.get("hbase.security.authentication"))) { config.set("hadoop.security.authentication", "Kerberos"); UserGroupInformation.setConfiguration(config); } if ((getProperties().getProperty("principal")!=null) && (getProperties().getProperty("keytab")!=null)) { try { UserGroupInformation.loginUserFromKeytab(getProperties().getProperty("principal"), getProperties().getProperty("keytab")); } catch (IOException e) { System.err.println("Keytab file is not readable or not found"); throw new DBException(e); } } String table = getProperties().getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); try { THREAD_COUNT.getAndIncrement(); synchronized (THREAD_COUNT) { if (connection == null) { // Initialize if not set up already. connection = ConnectionFactory.createConnection(config); // Terminate right now if table does not exist, since the client // will not propagate this error upstream once the workload // starts. final TableName tName = TableName.valueOf(table); try (Admin admin = connection.getAdmin()) { if (!admin.tableExists(tName)) { throw new DBException("Table " + tName + " does not exists"); } } } } } catch (java.io.IOException e) { throw new DBException(e); } if ((getProperties().getProperty("debug") != null) && (getProperties().getProperty("debug").compareTo("true") == 0)) { debug = true; } if ("false" .equals(getProperties().getProperty("hbase.usepagefilter", "true"))) { usePageFilter = false; } columnFamily = getProperties().getProperty("columnfamily"); if (columnFamily == null) { System.err.println("Error, must specify a columnfamily for HBase table"); throw new DBException("No columnfamily specified"); } columnFamilyBytes = Bytes.toBytes(columnFamily); } /** * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ @Override public void cleanup() throws DBException { // Get the measurements instance as this is the only client that should // count clean up time like an update if client-side buffering is // enabled. Measurements measurements = Measurements.getMeasurements(); try { long st = System.nanoTime(); if (bufferedMutator != null) { bufferedMutator.close(); } if (currentTable != null) { currentTable.close(); } long en = System.nanoTime(); final String type = clientSideBuffering ? "UPDATE" : "CLEANUP"; measurements.measure(type, (int) ((en - st) / 1000)); int threadCount = THREAD_COUNT.decrementAndGet(); if (threadCount <= 0) { // Means we are done so ok to shut down the Connection. synchronized (THREAD_COUNT) { if (connection != null) { connection.close(); connection = null; } } } } catch (IOException e) { throw new DBException(e); } } public void getHTable(String table) throws IOException { final TableName tName = TableName.valueOf(table); this.currentTable = connection.getTable(tName); if (clientSideBuffering) { final BufferedMutatorParams p = new BufferedMutatorParams(tName); p.writeBufferSize(writeBufferSize); this.bufferedMutator = connection.getBufferedMutator(p); } } /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table * The name of the table * @param key * The record key of the record to read. * @param fields * The list of fields to read, or null for all of them * @param result * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { // if this is a "new" table, init HTable object. Else, use existing one if (!tableName.equals(table)) { currentTable = null; try { getHTable(table); tableName = table; } catch (IOException e) { System.err.println("Error accessing HBase table: " + e); return Status.ERROR; } } Result r = null; try { if (debug) { System.out .println("Doing read from HBase columnfamily " + columnFamily); System.out.println("Doing read for key: " + key); } Get g = new Get(Bytes.toBytes(key)); if (fields == null) { g.addFamily(columnFamilyBytes); } else { for (String field : fields) { g.addColumn(columnFamilyBytes, Bytes.toBytes(field)); } } r = currentTable.get(g); } catch (IOException e) { if (debug) { System.err.println("Error doing get: " + e); } return Status.ERROR; } catch (ConcurrentModificationException e) { // do nothing for now...need to understand HBase concurrency model better return Status.ERROR; } if (r.isEmpty()) { return Status.NOT_FOUND; } while (r.advance()) { final Cell c = r.current(); result.put(Bytes.toString(CellUtil.cloneQualifier(c)), new ByteArrayByteIterator(CellUtil.cloneValue(c))); if (debug) { System.out.println( "Result for field: " + Bytes.toString(CellUtil.cloneQualifier(c)) + " is: " + Bytes.toString(CellUtil.cloneValue(c))); } } return Status.OK; } /** * Perform a range scan for a set of records in the database. Each field/value * pair from the result will be stored in a HashMap. * * @param table * The name of the table * @param startkey * The record key of the first record to read. * @param recordcount * The number of records to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one record * @return Zero on success, a non-zero error code on error */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { // if this is a "new" table, init HTable object. Else, use existing one if (!tableName.equals(table)) { currentTable = null; try { getHTable(table); tableName = table; } catch (IOException e) { System.err.println("Error accessing HBase table: " + e); return Status.ERROR; } } Scan s = new Scan(Bytes.toBytes(startkey)); // HBase has no record limit. Here, assume recordcount is small enough to // bring back in one call. // We get back recordcount records s.setCaching(recordcount); if (this.usePageFilter) { s.setFilter(new PageFilter(recordcount)); } // add specified fields or else all fields if (fields == null) { s.addFamily(columnFamilyBytes); } else { for (String field : fields) { s.addColumn(columnFamilyBytes, Bytes.toBytes(field)); } } // get results ResultScanner scanner = null; try { scanner = currentTable.getScanner(s); int numResults = 0; for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { // get row key String key = Bytes.toString(rr.getRow()); if (debug) { System.out.println("Got scan result for key: " + key); } HashMap<String, ByteIterator> rowResult = new HashMap<String, ByteIterator>(); while (rr.advance()) { final Cell cell = rr.current(); rowResult.put(Bytes.toString(CellUtil.cloneQualifier(cell)), new ByteArrayByteIterator(CellUtil.cloneValue(cell))); } // add rowResult to result vector result.add(rowResult); numResults++; // PageFilter does not guarantee that the number of results is <= // pageSize, so this // break is required. if (numResults >= recordcount) {// if hit recordcount, bail out break; } } // done with row } catch (IOException e) { if (debug) { System.out.println("Error in getting/parsing scan result: " + e); } return Status.ERROR; } finally { if (scanner != null) { scanner.close(); } } return Status.OK; } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table * The name of the table * @param key * The record key of the record to write * @param values * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { // if this is a "new" table, init HTable object. Else, use existing one if (!tableName.equals(table)) { currentTable = null; try { getHTable(table); tableName = table; } catch (IOException e) { System.err.println("Error accessing HBase table: " + e); return Status.ERROR; } } if (debug) { System.out.println("Setting up put for key: " + key); } Put p = new Put(Bytes.toBytes(key)); p.setDurability(durability); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { byte[] value = entry.getValue().toArray(); if (debug) { System.out.println("Adding field/value " + entry.getKey() + "/" + Bytes.toStringBinary(value) + " to put request"); } p.addColumn(columnFamilyBytes, Bytes.toBytes(entry.getKey()), value); } try { if (clientSideBuffering) { // removed Preconditions.checkNotNull, which throws NPE, in favor of NPE on next line bufferedMutator.mutate(p); } else { currentTable.put(p); } } catch (IOException e) { if (debug) { System.err.println("Error doing put: " + e); } return Status.ERROR; } catch (ConcurrentModificationException e) { // do nothing for now...hope this is rare return Status.ERROR; } return Status.OK; } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { return update(table, key, values); } /** * Delete a record from the database. * * @param table * The name of the table * @param key * The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ @Override public Status delete(String table, String key) { // if this is a "new" table, init HTable object. Else, use existing one if (!tableName.equals(table)) { currentTable = null; try { getHTable(table); tableName = table; } catch (IOException e) { System.err.println("Error accessing HBase table: " + e); return Status.ERROR; } } if (debug) { System.out.println("Doing delete for key: " + key); } final Delete d = new Delete(Bytes.toBytes(key)); d.setDurability(durability); try { if (clientSideBuffering) { // removed Preconditions.checkNotNull, which throws NPE, in favor of NPE on next line bufferedMutator.mutate(d); } else { currentTable.delete(d); } } catch (IOException e) { if (debug) { System.err.println("Error doing delete: " + e); } return Status.ERROR; } return Status.OK; } // Only non-private for testing. void setConfiguration(final Configuration newConfig) { this.config = newConfig; } } /* * For customized vim control set autoindent set si set shiftwidth=4 */
17,246
31.480226
95
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/test/java/site/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java
/* * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import site.ycsb.ByteIterator; import site.ycsb.Client; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.HashMap; import java.util.Properties; import java.util.Set; import java.util.Vector; import static org.junit.Assert.assertEquals; public abstract class ElasticsearchIntegTestBase { private DB db; abstract DB newDB(); private final static HashMap<String, ByteIterator> MOCK_DATA; private final static String MOCK_TABLE = "MOCK_TABLE"; private final static String FIELD_PREFIX = CoreWorkload.FIELD_NAME_PREFIX_DEFAULT; static { MOCK_DATA = new HashMap<>(10); for (int i = 1; i <= 10; i++) { MOCK_DATA.put(FIELD_PREFIX + i, new StringByteIterator("value" + i)); } } @Before public void setUp() throws DBException { final Properties props = new Properties(); props.put("es.new_index", "true"); props.put("es.setting.cluster.name", "test"); db = newDB(); db.setProperties(props); db.init(); for (int i = 0; i < 16; i++) { db.insert(MOCK_TABLE, Integer.toString(i), MOCK_DATA); } } @After public void tearDown() throws DBException { db.cleanup(); } @Test public void testInsert() { final Status result = db.insert(MOCK_TABLE, "0", MOCK_DATA); assertEquals(Status.OK, result); } /** * Test of delete method, of class ElasticsearchClient. */ @Test public void testDelete() { final Status result = db.delete(MOCK_TABLE, "1"); assertEquals(Status.OK, result); } /** * Test of read method, of class ElasticsearchClient. */ @Test public void testRead() { final Set<String> fields = MOCK_DATA.keySet(); final HashMap<String, ByteIterator> resultParam = new HashMap<>(10); final Status result = db.read(MOCK_TABLE, "1", fields, resultParam); assertEquals(Status.OK, result); } /** * Test of update method, of class ElasticsearchClient. */ @Test public void testUpdate() { final HashMap<String, ByteIterator> newValues = new HashMap<>(10); for (int i = 1; i <= 10; i++) { newValues.put(FIELD_PREFIX + i, new StringByteIterator("newvalue" + i)); } final Status updateResult = db.update(MOCK_TABLE, "1", newValues); assertEquals(Status.OK, updateResult); // validate that the values changed final HashMap<String, ByteIterator> resultParam = new HashMap<>(10); final Status readResult = db.read(MOCK_TABLE, "1", MOCK_DATA.keySet(), resultParam); assertEquals(Status.OK, readResult); for (int i = 1; i <= 10; i++) { assertEquals("newvalue" + i, resultParam.get(FIELD_PREFIX + i).toString()); } } /** * Test of scan method, of class ElasticsearchClient. */ @Test public void testScan() { final int recordcount = 10; final Set<String> fields = MOCK_DATA.keySet(); final Vector<HashMap<String, ByteIterator>> resultParam = new Vector<>(10); final Status result = db.scan(MOCK_TABLE, "1", recordcount, fields, resultParam); assertEquals(Status.OK, result); assertEquals(10, resultParam.size()); } }
4,203
29.463768
92
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/test/java/site/ycsb/db/elasticsearch5/ElasticsearchClientIT.java
/** * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import site.ycsb.DB; public class ElasticsearchClientIT extends ElasticsearchIntegTestBase { @Override DB newDB() { return new ElasticsearchClient(); } }
874
28.166667
71
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/test/java/site/ycsb/db/elasticsearch5/ElasticsearchRestClientIT.java
/** * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import site.ycsb.DB; public class ElasticsearchRestClientIT extends ElasticsearchIntegTestBase { @Override DB newDB() { return new ElasticsearchRestClient(); } }
872
28.1
75
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/main/java/site/ycsb/db/elasticsearch5/package-info.java
/* * Copyright (c) 2017 YCSB Contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for * <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a>. */ package site.ycsb.db.elasticsearch5;
807
32.666667
77
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/main/java/site/ycsb/db/elasticsearch5/ElasticsearchRestClient.java
/* * Copyright (c) 2017 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.HttpStatus; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.message.BasicHeader; import org.apache.http.nio.entity.NStringEntity; import org.codehaus.jackson.map.ObjectMapper; import org.elasticsearch.client.Response; import org.elasticsearch.client.RestClient; import org.elasticsearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Vector; import static site.ycsb.db.elasticsearch5.Elasticsearch5.KEY; import static site.ycsb.db.elasticsearch5.Elasticsearch5.parseIntegerProperty; import static java.util.Collections.emptyMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; /** * Elasticsearch REST client for YCSB framework. */ public class ElasticsearchRestClient extends DB { private static final String DEFAULT_INDEX_KEY = "es.ycsb"; private static final String DEFAULT_REMOTE_HOST = "localhost:9200"; private static final int NUMBER_OF_SHARDS = 1; private static final int NUMBER_OF_REPLICAS = 0; private RestClient restClient; private String indexKey; /** * * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { final Properties props = getProperties(); this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY); final int numberOfShards = parseIntegerProperty(props, "es.number_of_shards", NUMBER_OF_SHARDS); final int numberOfReplicas = parseIntegerProperty(props, "es.number_of_replicas", NUMBER_OF_REPLICAS); final Boolean newIndex = Boolean.parseBoolean(props.getProperty("es.new_index", "false")); final String[] nodeList = props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST).split(","); final List<HttpHost> esHttpHosts = new ArrayList<>(nodeList.length); for (String h : nodeList) { String[] nodes = h.split(":"); esHttpHosts.add(new HttpHost(nodes[0], Integer.valueOf(nodes[1]), "http")); } restClient = RestClient.builder(esHttpHosts.toArray(new HttpHost[esHttpHosts.size()])).build(); final Response existsResponse = performRequest(restClient, "HEAD", "/" + indexKey); final boolean exists = existsResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK; if (exists && newIndex) { final Response deleteResponse = performRequest(restClient, "DELETE", "/" + indexKey); final int statusCode = deleteResponse.getStatusLine().getStatusCode(); if (statusCode != HttpStatus.SC_OK) { throw new DBException("delete [" + indexKey + "] failed with status [" + statusCode + "]"); } } if (!exists || newIndex) { try (XContentBuilder builder = jsonBuilder()) { builder.startObject(); builder.startObject("settings"); builder.field("index.number_of_shards", numberOfShards); builder.field("index.number_of_replicas", numberOfReplicas); builder.endObject(); builder.endObject(); final Map<String, String> params = emptyMap(); final StringEntity entity = new StringEntity(builder.string()); final Response createResponse = performRequest(restClient, "PUT", "/" + indexKey, params, entity); final int statusCode = createResponse.getStatusLine().getStatusCode(); if (statusCode != HttpStatus.SC_OK) { throw new DBException("create [" + indexKey + "] failed with status [" + statusCode + "]"); } } catch (final IOException e) { throw new DBException(e); } } final Map<String, String> params = Collections.singletonMap("wait_for_status", "green"); final Response healthResponse = performRequest(restClient, "GET", "/_cluster/health/" + indexKey, params); final int healthStatusCode = healthResponse.getStatusLine().getStatusCode(); if (healthStatusCode != HttpStatus.SC_OK) { throw new DBException("cluster health [" + indexKey + "] failed with status [" + healthStatusCode + "]"); } } private static Response performRequest( final RestClient restClient, final String method, final String endpoint) throws DBException { final Map<String, String> params = emptyMap(); return performRequest(restClient, method, endpoint, params); } private static Response performRequest( final RestClient restClient, final String method, final String endpoint, final Map<String, String> params) throws DBException { return performRequest(restClient, method, endpoint, params, null); } private static final Header[] EMPTY_HEADERS = new Header[0]; private static Response performRequest( final RestClient restClient, final String method, final String endpoint, final Map<String, String> params, final HttpEntity entity) throws DBException { try { final Header[] headers; if (entity != null) { headers = new Header[]{new BasicHeader("content-type", ContentType.APPLICATION_JSON.toString())}; } else { headers = EMPTY_HEADERS; } return restClient.performRequest( method, endpoint, params, entity, headers); } catch (final IOException e) { e.printStackTrace(); throw new DBException(e); } } @Override public void cleanup() throws DBException { if (restClient != null) { try { restClient.close(); restClient = null; } catch (final IOException e) { throw new DBException(e); } } } private volatile boolean isRefreshNeeded = false; @Override public Status insert(final String table, final String key, final Map<String, ByteIterator> values) { try { final Map<String, String> data = StringByteIterator.getStringMap(values); data.put(KEY, key); final Response response = restClient.performRequest( "POST", "/" + indexKey + "/" + table + "/", Collections.<String, String>emptyMap(), new NStringEntity(new ObjectMapper().writeValueAsString(data), ContentType.APPLICATION_JSON)); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_CREATED) { return Status.ERROR; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status delete(final String table, final String key) { try { final Response searchResponse = search(table, key); final int statusCode = searchResponse.getStatusLine().getStatusCode(); if (statusCode == HttpStatus.SC_NOT_FOUND) { return Status.NOT_FOUND; } else if (statusCode != HttpStatus.SC_OK) { return Status.ERROR; } final Map<String, Object> map = map(searchResponse); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>)map.get("hits"); final int total = (int)hits.get("total"); if (total == 0) { return Status.NOT_FOUND; } @SuppressWarnings("unchecked") final Map<String, Object> hit = (Map<String, Object>)((List<Object>)hits.get("hits")).get(0); final Response deleteResponse = restClient.performRequest("DELETE", "/" + indexKey + "/" + table + "/" + hit.get("_id")); if (deleteResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { return Status.ERROR; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status read( final String table, final String key, final Set<String> fields, final Map<String, ByteIterator> result) { try { final Response searchResponse = search(table, key); final int statusCode = searchResponse.getStatusLine().getStatusCode(); if (statusCode == 404) { return Status.NOT_FOUND; } else if (statusCode != HttpStatus.SC_OK) { return Status.ERROR; } final Map<String, Object> map = map(searchResponse); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>)map.get("hits"); final int total = (int)hits.get("total"); if (total == 0) { return Status.NOT_FOUND; } @SuppressWarnings("unchecked") final Map<String, Object> hit = (Map<String, Object>)((List<Object>)hits.get("hits")).get(0); @SuppressWarnings("unchecked") final Map<String, Object> source = (Map<String, Object>)hit.get("_source"); if (fields != null) { for (final String field : fields) { result.put(field, new StringByteIterator((String) source.get(field))); } } else { for (final Map.Entry<String, Object> e : source.entrySet()) { if (KEY.equals(e.getKey())) { continue; } result.put(e.getKey(), new StringByteIterator((String) e.getValue())); } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status update(final String table, final String key, final Map<String, ByteIterator> values) { try { final Response searchResponse = search(table, key); final int statusCode = searchResponse.getStatusLine().getStatusCode(); if (statusCode == 404) { return Status.NOT_FOUND; } else if (statusCode != HttpStatus.SC_OK) { return Status.ERROR; } final Map<String, Object> map = map(searchResponse); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>) map.get("hits"); final int total = (int) hits.get("total"); if (total == 0) { return Status.NOT_FOUND; } @SuppressWarnings("unchecked") final Map<String, Object> hit = (Map<String, Object>) ((List<Object>) hits.get("hits")).get(0); @SuppressWarnings("unchecked") final Map<String, Object> source = (Map<String, Object>) hit.get("_source"); for (final Map.Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { source.put(entry.getKey(), entry.getValue()); } final Map<String, String> params = emptyMap(); final Response response = restClient.performRequest( "PUT", "/" + indexKey + "/" + table + "/" + hit.get("_id"), params, new NStringEntity(new ObjectMapper().writeValueAsString(source), ContentType.APPLICATION_JSON)); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { return Status.ERROR; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status scan( final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { try { final Response response; try (XContentBuilder builder = jsonBuilder()) { builder.startObject(); builder.startObject("query"); builder.startObject("range"); builder.startObject(KEY); builder.field("gte", startkey); builder.endObject(); builder.endObject(); builder.endObject(); builder.field("size", recordcount); builder.endObject(); response = search(table, builder); @SuppressWarnings("unchecked") final Map<String, Object> map = map(response); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>)map.get("hits"); @SuppressWarnings("unchecked") final List<Map<String, Object>> list = (List<Map<String, Object>>) hits.get("hits"); for (final Map<String, Object> hit : list) { @SuppressWarnings("unchecked") final Map<String, Object> source = (Map<String, Object>)hit.get("_source"); final HashMap<String, ByteIterator> entry; if (fields != null) { entry = new HashMap<>(fields.size()); for (final String field : fields) { entry.put(field, new StringByteIterator((String) source.get(field))); } } else { entry = new HashMap<>(hit.size()); for (final Map.Entry<String, Object> field : source.entrySet()) { if (KEY.equals(field.getKey())) { continue; } entry.put(field.getKey(), new StringByteIterator((String) field.getValue())); } } result.add(entry); } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } private void refreshIfNeeded() throws IOException { if (isRefreshNeeded) { final boolean refresh; synchronized (this) { if (isRefreshNeeded) { refresh = true; isRefreshNeeded = false; } else { refresh = false; } } if (refresh) { restClient.performRequest("POST", "/" + indexKey + "/_refresh"); } } } private Response search(final String table, final String key) throws IOException { try (XContentBuilder builder = jsonBuilder()) { builder.startObject(); builder.startObject("query"); builder.startObject("term"); builder.field(KEY, key); builder.endObject(); builder.endObject(); builder.endObject(); return search(table, builder); } } private Response search(final String table, final XContentBuilder builder) throws IOException { refreshIfNeeded(); final Map<String, String> params = emptyMap(); final StringEntity entity = new StringEntity(builder.string()); final Header header = new BasicHeader("content-type", ContentType.APPLICATION_JSON.toString()); return restClient.performRequest("GET", "/" + indexKey + "/" + table + "/_search", params, entity, header); } private Map<String, Object> map(final Response response) throws IOException { try (InputStream is = response.getEntity().getContent()) { final ObjectMapper mapper = new ObjectMapper(); @SuppressWarnings("unchecked") final Map<String, Object> map = mapper.readValue(is, Map.class); return map; } } }
16,038
35.042697
116
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/main/java/site/ycsb/db/elasticsearch5/ElasticsearchClient.java
/* * Copyright (c) 2017 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.elasticsearch.action.DocWriteResponse; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; import org.elasticsearch.action.admin.indices.refresh.RefreshRequest; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Requests; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.index.query.TermQueryBuilder; import org.elasticsearch.search.SearchHit; import org.elasticsearch.transport.client.PreBuiltTransportClient; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.Vector; import static site.ycsb.db.elasticsearch5.Elasticsearch5.KEY; import static site.ycsb.db.elasticsearch5.Elasticsearch5.parseIntegerProperty; import static org.elasticsearch.common.settings.Settings.Builder; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; /** * Elasticsearch client for YCSB framework. */ public class ElasticsearchClient extends DB { private static final String DEFAULT_CLUSTER_NAME = "es.ycsb.cluster"; private static final String DEFAULT_INDEX_KEY = "es.ycsb"; private static final String DEFAULT_REMOTE_HOST = "localhost:9300"; private static final int NUMBER_OF_SHARDS = 1; private static final int NUMBER_OF_REPLICAS = 0; private TransportClient client; private String indexKey; /** * * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { final Properties props = getProperties(); this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY); final int numberOfShards = parseIntegerProperty(props, "es.number_of_shards", NUMBER_OF_SHARDS); final int numberOfReplicas = parseIntegerProperty(props, "es.number_of_replicas", NUMBER_OF_REPLICAS); final Boolean newIndex = Boolean.parseBoolean(props.getProperty("es.new_index", "false")); final Builder settings = Settings.builder().put("cluster.name", DEFAULT_CLUSTER_NAME); // if properties file contains elasticsearch user defined properties // add it to the settings file (will overwrite the defaults). for (final Entry<Object, Object> e : props.entrySet()) { if (e.getKey() instanceof String) { final String key = (String) e.getKey(); if (key.startsWith("es.setting.")) { settings.put(key.substring("es.setting.".length()), e.getValue()); } } } settings.put("client.transport.sniff", true) .put("client.transport.ignore_cluster_name", false) .put("client.transport.ping_timeout", "30s") .put("client.transport.nodes_sampler_interval", "30s"); // Default it to localhost:9300 final String[] nodeList = props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST).split(","); client = new PreBuiltTransportClient(settings.build()); for (String h : nodeList) { String[] nodes = h.split(":"); final InetAddress address; try { address = InetAddress.getByName(nodes[0]); } catch (UnknownHostException e) { throw new IllegalArgumentException("unable to identity host [" + nodes[0]+ "]", e); } final int port; try { port = Integer.parseInt(nodes[1]); } catch (final NumberFormatException e) { throw new IllegalArgumentException("unable to parse port [" + nodes[1] + "]", e); } client.addTransportAddress(new InetSocketTransportAddress(address, port)); } final boolean exists = client.admin().indices() .exists(Requests.indicesExistsRequest(indexKey)).actionGet() .isExists(); if (exists && newIndex) { client.admin().indices().prepareDelete(indexKey).get(); } if (!exists || newIndex) { client.admin().indices().create( new CreateIndexRequest(indexKey) .settings( Settings.builder() .put("index.number_of_shards", numberOfShards) .put("index.number_of_replicas", numberOfReplicas) )).actionGet(); } client.admin().cluster().health(new ClusterHealthRequest().waitForGreenStatus()).actionGet(); } @Override public void cleanup() throws DBException { if (client != null) { client.close(); client = null; } } private volatile boolean isRefreshNeeded = false; @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try (XContentBuilder doc = jsonBuilder()) { doc.startObject(); for (final Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { doc.field(entry.getKey(), entry.getValue()); } doc.field(KEY, key); doc.endObject(); final IndexResponse indexResponse = client.prepareIndex(indexKey, table).setSource(doc).get(); if (indexResponse.getResult() != DocWriteResponse.Result.CREATED) { return Status.ERROR; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status delete(final String table, final String key) { try { final SearchResponse searchResponse = search(table, key); if (searchResponse.getHits().totalHits == 0) { return Status.NOT_FOUND; } final String id = searchResponse.getHits().getAt(0).getId(); final DeleteResponse deleteResponse = client.prepareDelete(indexKey, table, id).get(); if (deleteResponse.getResult() == DocWriteResponse.Result.NOT_FOUND) { return Status.NOT_FOUND; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status read( final String table, final String key, final Set<String> fields, final Map<String, ByteIterator> result) { try { final SearchResponse searchResponse = search(table, key); if (searchResponse.getHits().totalHits == 0) { return Status.NOT_FOUND; } final SearchHit hit = searchResponse.getHits().getAt(0); if (fields != null) { for (final String field : fields) { result.put(field, new StringByteIterator((String) hit.getSource().get(field))); } } else { for (final Map.Entry<String, Object> e : hit.getSource().entrySet()) { if (KEY.equals(e.getKey())) { continue; } result.put(e.getKey(), new StringByteIterator((String) e.getValue())); } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status update(final String table, final String key, final Map<String, ByteIterator> values) { try { final SearchResponse response = search(table, key); if (response.getHits().totalHits == 0) { return Status.NOT_FOUND; } final SearchHit hit = response.getHits().getAt(0); for (final Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { hit.getSource().put(entry.getKey(), entry.getValue()); } final IndexResponse indexResponse = client.prepareIndex(indexKey, table, hit.getId()).setSource(hit.getSource()).get(); if (indexResponse.getResult() != DocWriteResponse.Result.UPDATED) { return Status.ERROR; } if (!isRefreshNeeded) { synchronized (this) { isRefreshNeeded = true; } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status scan( final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { try { refreshIfNeeded(); final RangeQueryBuilder query = new RangeQueryBuilder(KEY).gte(startkey); final SearchResponse response = client.prepareSearch(indexKey).setQuery(query).setSize(recordcount).get(); for (final SearchHit hit : response.getHits()) { final HashMap<String, ByteIterator> entry; if (fields != null) { entry = new HashMap<>(fields.size()); for (final String field : fields) { entry.put(field, new StringByteIterator((String) hit.getSource().get(field))); } } else { entry = new HashMap<>(hit.getSource().size()); for (final Map.Entry<String, Object> field : hit.getSource().entrySet()) { if (KEY.equals(field.getKey())) { continue; } entry.put(field.getKey(), new StringByteIterator((String) field.getValue())); } } result.add(entry); } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } } private void refreshIfNeeded() { if (isRefreshNeeded) { final boolean refresh; synchronized (this) { if (isRefreshNeeded) { refresh = true; isRefreshNeeded = false; } else { refresh = false; } } if (refresh) { client.admin().indices().refresh(new RefreshRequest()).actionGet(); } } } private SearchResponse search(final String table, final String key) { refreshIfNeeded(); return client.prepareSearch(indexKey).setTypes(table).setQuery(new TermQueryBuilder(KEY, key)).get(); } }
11,290
32.805389
112
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch5/src/main/java/site/ycsb/db/elasticsearch5/Elasticsearch5.java
/* * Copyright (c) 2017 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.elasticsearch5; import java.util.Properties; final class Elasticsearch5 { private Elasticsearch5() { } static final String KEY = "key"; static int parseIntegerProperty(final Properties properties, final String key, final int defaultValue) { final String value = properties.getProperty(key); return value == null ? defaultValue : Integer.parseInt(value); } }
1,074
28.861111
106
java
null
NearPMSW-main/baseline/logging/YCSB2/azuretablestorage/src/main/java/site/ycsb/db/azuretablestorage/package-info.java
/* * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://azure.microsoft.com/en-us/services/storage/">Azure table Storage</a>. */ package site.ycsb.db.azuretablestorage;
818
34.608696
110
java
null
NearPMSW-main/baseline/logging/YCSB2/azuretablestorage/src/main/java/site/ycsb/db/azuretablestorage/AzureClient.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.azuretablestorage; import com.microsoft.azure.storage.CloudStorageAccount; import com.microsoft.azure.storage.table.CloudTable; import com.microsoft.azure.storage.table.CloudTableClient; import com.microsoft.azure.storage.table.DynamicTableEntity; import com.microsoft.azure.storage.table.EntityProperty; import com.microsoft.azure.storage.table.EntityResolver; import com.microsoft.azure.storage.table.TableBatchOperation; import com.microsoft.azure.storage.table.TableOperation; import com.microsoft.azure.storage.table.TableQuery; import com.microsoft.azure.storage.table.TableServiceEntity; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.Vector; /** * YCSB binding for <a href="https://azure.microsoft.com/en-us/services/storage/">Azure</a>. * See {@code azure/README.md} for details. */ public class AzureClient extends DB { public static final String PROTOCOL = "azure.protocal"; public static final String PROTOCOL_DEFAULT = "https"; public static final String TABLE_ENDPOINT = "azure.endpoint"; public static final String ACCOUNT = "azure.account"; public static final String KEY = "azure.key"; public static final String TABLE = "azure.table"; public static final String TABLE_DEFAULT = "usertable"; public static final String PARTITIONKEY = "azure.partitionkey"; public static final String PARTITIONKEY_DEFAULT = "Test"; public static final String BATCHSIZE = "azure.batchsize"; public static final String BATCHSIZE_DEFAULT = "1"; private static final int BATCHSIZE_UPPERBOUND = 100; private static final TableBatchOperation BATCH_OPERATION = new TableBatchOperation(); private static String partitionKey; private CloudStorageAccount storageAccount = null; private CloudTableClient tableClient = null; private CloudTable cloudTable = null; private static int batchSize; private static int curIdx = 0; @Override public void init() throws DBException { Properties props = getProperties(); String protocol = props.getProperty(PROTOCOL, PROTOCOL_DEFAULT); if (protocol != "https" && protocol != "http") { throw new DBException("Protocol must be 'http' or 'https'!\n"); } String table = props.getProperty(TABLE, TABLE_DEFAULT); partitionKey = props.getProperty(PARTITIONKEY, PARTITIONKEY_DEFAULT); batchSize = Integer.parseInt(props.getProperty(BATCHSIZE, BATCHSIZE_DEFAULT)); if (batchSize < 1 || batchSize > BATCHSIZE_UPPERBOUND) { throw new DBException(String.format("Batchsize must be between 1 and %d!\n", BATCHSIZE_UPPERBOUND)); } String account = props.getProperty(ACCOUNT); String key = props.getProperty(KEY); String tableEndPoint = props.getProperty(TABLE_ENDPOINT); String storageConnectionString = getStorageConnectionString(protocol, account, key, tableEndPoint); try { storageAccount = CloudStorageAccount.parse(storageConnectionString); } catch (Exception e) { throw new DBException("Could not connect to the account.\n", e); } tableClient = storageAccount.createCloudTableClient(); try { cloudTable = tableClient.getTableReference(table); cloudTable.createIfNotExists(); } catch (Exception e) { throw new DBException("Could not connect to the table.\n", e); } } @Override public void cleanup() { } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { if (fields != null) { return readSubset(key, fields, result); } else { return readEntity(key, result); } } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { String whereStr = String.format("(PartitionKey eq '%s') and (RowKey ge '%s')", partitionKey, startkey); TableQuery<DynamicTableEntity> scanQuery = new TableQuery<DynamicTableEntity>(DynamicTableEntity.class) .where(whereStr).take(recordcount); int cnt = 0; for (DynamicTableEntity entity : cloudTable.execute(scanQuery)) { HashMap<String, EntityProperty> properties = entity.getProperties(); HashMap<String, ByteIterator> cur = new HashMap<String, ByteIterator>(); for (Entry<String, EntityProperty> entry : properties.entrySet()) { String fieldName = entry.getKey(); ByteIterator fieldVal = new ByteArrayByteIterator(entry.getValue().getValueAsByteArray()); if (fields == null || fields.contains(fieldName)) { cur.put(fieldName, fieldVal); } } result.add(cur); if (++cnt == recordcount) { break; } } return Status.OK; } catch (Exception e) { return Status.ERROR; } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { return insertOrUpdate(key, values); } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { if (batchSize == 1) { return insertOrUpdate(key, values); } else { return insertBatch(key, values); } } @Override public Status delete(String table, String key) { try { // firstly, retrieve the entity to be deleted TableOperation retrieveOp = TableOperation.retrieve(partitionKey, key, TableServiceEntity.class); TableServiceEntity entity = cloudTable.execute(retrieveOp).getResultAsType(); // secondly, delete the entity TableOperation deleteOp = TableOperation.delete(entity); cloudTable.execute(deleteOp); return Status.OK; } catch (Exception e) { return Status.ERROR; } } private String getStorageConnectionString(String protocol, String account, String key, String tableEndPoint) { String res = String.format("DefaultEndpointsProtocol=%s;AccountName=%s;AccountKey=%s", protocol, account, key); if (tableEndPoint != null) { res = String.format("%s;TableEndpoint=%s", res, tableEndPoint); } return res; } /* * Read subset of properties instead of full fields with projection. */ public Status readSubset(String key, Set<String> fields, Map<String, ByteIterator> result) { String whereStr = String.format("RowKey eq '%s'", key); TableQuery<TableServiceEntity> projectionQuery = TableQuery.from( TableServiceEntity.class).where(whereStr).select(fields.toArray(new String[0])); EntityResolver<HashMap<String, ByteIterator>> resolver = new EntityResolver<HashMap<String, ByteIterator>>() { public HashMap<String, ByteIterator> resolve(String partitionkey, String rowKey, Date timeStamp, HashMap<String, EntityProperty> properties, String etag) { HashMap<String, ByteIterator> tmp = new HashMap<String, ByteIterator>(); for (Entry<String, EntityProperty> entry : properties.entrySet()) { String key = entry.getKey(); ByteIterator val = new ByteArrayByteIterator(entry.getValue().getValueAsByteArray()); tmp.put(key, val); } return tmp; } }; try { for (HashMap<String, ByteIterator> tmp : cloudTable.execute(projectionQuery, resolver)) { for (Entry<String, ByteIterator> entry : tmp.entrySet()){ String fieldName = entry.getKey(); ByteIterator fieldVal = entry.getValue(); result.put(fieldName, fieldVal); } } return Status.OK; } catch (Exception e) { return Status.ERROR; } } private Status readEntity(String key, Map<String, ByteIterator> result) { try { // firstly, retrieve the entity to be deleted TableOperation retrieveOp = TableOperation.retrieve(partitionKey, key, DynamicTableEntity.class); DynamicTableEntity entity = cloudTable.execute(retrieveOp).getResultAsType(); HashMap<String, EntityProperty> properties = entity.getProperties(); for (Entry<String, EntityProperty> entry: properties.entrySet()) { String fieldName = entry.getKey(); ByteIterator fieldVal = new ByteArrayByteIterator(entry.getValue().getValueAsByteArray()); result.put(fieldName, fieldVal); } return Status.OK; } catch (Exception e) { return Status.ERROR; } } private Status insertBatch(String key, Map<String, ByteIterator> values) { HashMap<String, EntityProperty> properties = new HashMap<String, EntityProperty>(); for (Entry<String, ByteIterator> entry : values.entrySet()) { String fieldName = entry.getKey(); byte[] fieldVal = entry.getValue().toArray(); properties.put(fieldName, new EntityProperty(fieldVal)); } DynamicTableEntity entity = new DynamicTableEntity(partitionKey, key, properties); BATCH_OPERATION.insertOrReplace(entity); if (++curIdx == batchSize) { try { cloudTable.execute(BATCH_OPERATION); BATCH_OPERATION.clear(); curIdx = 0; } catch (Exception e) { return Status.ERROR; } } return Status.OK; } private Status insertOrUpdate(String key, Map<String, ByteIterator> values) { HashMap<String, EntityProperty> properties = new HashMap<String, EntityProperty>(); for (Entry<String, ByteIterator> entry : values.entrySet()) { String fieldName = entry.getKey(); byte[] fieldVal = entry.getValue().toArray(); properties.put(fieldName, new EntityProperty(fieldVal)); } DynamicTableEntity entity = new DynamicTableEntity(partitionKey, key, properties); TableOperation insertOrReplace = TableOperation.insertOrReplace(entity); try { cloudTable.execute(insertOrReplace); return Status.OK; } catch (Exception e) { return Status.ERROR; } } }
10,830
37.544484
112
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/test/java/site/ycsb/db/JdbcDBClientTest.java
/** * Copyright (c) 2015 - 2016 Yahoo! Inc., 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import static org.junit.Assert.*; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.StringByteIterator; import org.junit.*; import java.sql.*; import java.util.HashMap; import java.util.Map; import java.util.HashSet; import java.util.Set; import java.util.Properties; import java.util.Vector; public class JdbcDBClientTest { private static final String TEST_DB_DRIVER = "org.hsqldb.jdbc.JDBCDriver"; private static final String TEST_DB_URL = "jdbc:hsqldb:mem:ycsb"; private static final String TEST_DB_USER = "sa"; private static final String TABLE_NAME = "USERTABLE"; private static final int FIELD_LENGTH = 32; private static final String FIELD_PREFIX = "FIELD"; private static final String KEY_PREFIX = "user"; private static final String KEY_FIELD = "YCSB_KEY"; private static final int NUM_FIELDS = 3; private static Connection jdbcConnection = null; private static JdbcDBClient jdbcDBClient = null; @BeforeClass public static void setup() { setupWithBatch(1, true); } public static void setupWithBatch(int batchSize, boolean autoCommit) { try { jdbcConnection = DriverManager.getConnection(TEST_DB_URL); jdbcDBClient = new JdbcDBClient(); Properties p = new Properties(); p.setProperty(JdbcDBClient.CONNECTION_URL, TEST_DB_URL); p.setProperty(JdbcDBClient.DRIVER_CLASS, TEST_DB_DRIVER); p.setProperty(JdbcDBClient.CONNECTION_USER, TEST_DB_USER); p.setProperty(JdbcDBClient.DB_BATCH_SIZE, Integer.toString(batchSize)); p.setProperty(JdbcDBClient.JDBC_BATCH_UPDATES, "true"); p.setProperty(JdbcDBClient.JDBC_AUTO_COMMIT, Boolean.toString(autoCommit)); jdbcDBClient.setProperties(p); jdbcDBClient.init(); } catch (SQLException e) { e.printStackTrace(); fail("Could not create local Database"); } catch (DBException e) { e.printStackTrace(); fail("Could not create JdbcDBClient instance"); } } @AfterClass public static void teardown() { try { if (jdbcConnection != null) { jdbcConnection.close(); } } catch (SQLException e) { e.printStackTrace(); } try { if (jdbcDBClient != null) { jdbcDBClient.cleanup(); } } catch (DBException e) { e.printStackTrace(); } } @Before public void prepareTest() { try { DatabaseMetaData metaData = jdbcConnection.getMetaData(); ResultSet tableResults = metaData.getTables(null, null, TABLE_NAME, null); if (tableResults.next()) { // If the table already exists, just truncate it jdbcConnection.prepareStatement( String.format("TRUNCATE TABLE %s", TABLE_NAME) ).execute(); } else { // If the table does not exist then create it StringBuilder createString = new StringBuilder( String.format("CREATE TABLE %s (%s VARCHAR(100) PRIMARY KEY", TABLE_NAME, KEY_FIELD) ); for (int i = 0; i < NUM_FIELDS; i++) { createString.append( String.format(", %s%d VARCHAR(100)", FIELD_PREFIX, i) ); } createString.append(")"); jdbcConnection.prepareStatement(createString.toString()).execute(); } } catch (SQLException e) { e.printStackTrace(); fail("Failed to prepare test"); } } /* This is a copy of buildDeterministicValue() from core:site.ycsb.workloads.CoreWorkload.java. That method is neither public nor static so we need a copy. */ private String buildDeterministicValue(String key, String fieldkey) { int size = FIELD_LENGTH; StringBuilder sb = new StringBuilder(size); sb.append(key); sb.append(':'); sb.append(fieldkey); while (sb.length() < size) { sb.append(':'); sb.append(sb.toString().hashCode()); } sb.setLength(size); return sb.toString(); } /* Inserts a row of deterministic values for the given insertKey using the jdbcDBClient. */ private HashMap<String, ByteIterator> insertRow(String insertKey) { HashMap<String, ByteIterator> insertMap = new HashMap<String, ByteIterator>(); for (int i = 0; i < 3; i++) { insertMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue(insertKey, FIELD_PREFIX + i))); } jdbcDBClient.insert(TABLE_NAME, insertKey, insertMap); return insertMap; } @Test public void insertTest() { try { String insertKey = "user0"; HashMap<String, ByteIterator> insertMap = insertRow(insertKey); ResultSet resultSet = jdbcConnection.prepareStatement( String.format("SELECT * FROM %s", TABLE_NAME) ).executeQuery(); // Check we have a result Row assertTrue(resultSet.next()); // Check that all the columns have expected values assertEquals(resultSet.getString(KEY_FIELD), insertKey); for (int i = 0; i < 3; i++) { assertEquals(resultSet.getString(FIELD_PREFIX + i), insertMap.get(FIELD_PREFIX + i).toString()); } // Check that we do not have any more rows assertFalse(resultSet.next()); resultSet.close(); } catch (SQLException e) { e.printStackTrace(); fail("Failed insertTest"); } } @Test public void updateTest() { try { String preupdateString = "preupdate"; StringBuilder fauxInsertString = new StringBuilder( String.format("INSERT INTO %s VALUES(?", TABLE_NAME) ); for (int i = 0; i < NUM_FIELDS; i++) { fauxInsertString.append(",?"); } fauxInsertString.append(")"); PreparedStatement fauxInsertStatement = jdbcConnection.prepareStatement(fauxInsertString.toString()); for (int i = 2; i < NUM_FIELDS + 2; i++) { fauxInsertStatement.setString(i, preupdateString); } fauxInsertStatement.setString(1, "user0"); fauxInsertStatement.execute(); fauxInsertStatement.setString(1, "user1"); fauxInsertStatement.execute(); fauxInsertStatement.setString(1, "user2"); fauxInsertStatement.execute(); HashMap<String, ByteIterator> updateMap = new HashMap<String, ByteIterator>(); for (int i = 0; i < 3; i++) { updateMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue("user1", FIELD_PREFIX + i))); } jdbcDBClient.update(TABLE_NAME, "user1", updateMap); ResultSet resultSet = jdbcConnection.prepareStatement( String.format("SELECT * FROM %s ORDER BY %s", TABLE_NAME, KEY_FIELD) ).executeQuery(); // Ensure that user0 record was not changed resultSet.next(); assertEquals("Assert first row key is user0", resultSet.getString(KEY_FIELD), "user0"); for (int i = 0; i < 3; i++) { assertEquals("Assert first row fields contain preupdateString", resultSet.getString(FIELD_PREFIX + i), preupdateString); } // Check that all the columns have expected values for user1 record resultSet.next(); assertEquals(resultSet.getString(KEY_FIELD), "user1"); for (int i = 0; i < 3; i++) { assertEquals(resultSet.getString(FIELD_PREFIX + i), updateMap.get(FIELD_PREFIX + i).toString()); } // Ensure that user2 record was not changed resultSet.next(); assertEquals("Assert third row key is user2", resultSet.getString(KEY_FIELD), "user2"); for (int i = 0; i < 3; i++) { assertEquals("Assert third row fields contain preupdateString", resultSet.getString(FIELD_PREFIX + i), preupdateString); } resultSet.close(); } catch (SQLException e) { e.printStackTrace(); fail("Failed updateTest"); } } @Test public void readTest() { String insertKey = "user0"; HashMap<String, ByteIterator> insertMap = insertRow(insertKey); Set<String> readFields = new HashSet<String>(); HashMap<String, ByteIterator> readResultMap = new HashMap<String, ByteIterator>(); // Test reading a single field readFields.add("FIELD0"); jdbcDBClient.read(TABLE_NAME, insertKey, readFields, readResultMap); assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); for (String field: readFields) { assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); } readResultMap = new HashMap<String, ByteIterator>(); // Test reading all fields readFields.add("FIELD1"); readFields.add("FIELD2"); jdbcDBClient.read(TABLE_NAME, insertKey, readFields, readResultMap); assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); for (String field: readFields) { assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); } } @Test public void deleteTest() { try { insertRow("user0"); String deleteKey = "user1"; insertRow(deleteKey); insertRow("user2"); jdbcDBClient.delete(TABLE_NAME, deleteKey); ResultSet resultSet = jdbcConnection.prepareStatement( String.format("SELECT * FROM %s", TABLE_NAME) ).executeQuery(); int totalRows = 0; while (resultSet.next()) { assertNotEquals("Assert this is not the deleted row key", deleteKey, resultSet.getString(KEY_FIELD)); totalRows++; } // Check we do not have a result Row assertEquals("Assert we ended with the correct number of rows", totalRows, 2); resultSet.close(); } catch (SQLException e) { e.printStackTrace(); fail("Failed deleteTest"); } } @Test public void scanTest() throws SQLException { Map<String, HashMap<String, ByteIterator>> keyMap = new HashMap<String, HashMap<String, ByteIterator>>(); for (int i = 0; i < 5; i++) { String insertKey = KEY_PREFIX + i; keyMap.put(insertKey, insertRow(insertKey)); } Set<String> fieldSet = new HashSet<String>(); fieldSet.add("FIELD0"); fieldSet.add("FIELD1"); int startIndex = 1; int resultRows = 3; Vector<HashMap<String, ByteIterator>> resultVector = new Vector<HashMap<String, ByteIterator>>(); jdbcDBClient.scan(TABLE_NAME, KEY_PREFIX + startIndex, resultRows, fieldSet, resultVector); // Check the resultVector is the correct size assertEquals("Assert the correct number of results rows were returned", resultRows, resultVector.size()); // Check each vector row to make sure we have the correct fields int testIndex = startIndex; for (Map<String, ByteIterator> result: resultVector) { assertEquals("Assert that this row has the correct number of fields", fieldSet.size(), result.size()); for (String field: fieldSet) { assertEquals("Assert this field is correct in this row", keyMap.get(KEY_PREFIX + testIndex).get(field).toString(), result.get(field).toString()); } testIndex++; } } @Test public void insertBatchTest() throws DBException { insertBatchTest(20); } @Test public void insertPartialBatchTest() throws DBException { insertBatchTest(19); } public void insertBatchTest(int numRows) throws DBException { teardown(); setupWithBatch(10, false); try { String insertKey = "user0"; HashMap<String, ByteIterator> insertMap = insertRow(insertKey); assertEquals(3, insertMap.size()); ResultSet resultSet = jdbcConnection.prepareStatement( String.format("SELECT * FROM %s", TABLE_NAME) ).executeQuery(); // Check we do not have a result Row (because batch is not full yet) assertFalse(resultSet.next()); // insert more rows, completing 1 batch (still results are partial). for (int i = 1; i < numRows; i++) { insertMap = insertRow("user" + i); } // assertNumRows(10 * (numRows / 10)); // call cleanup, which should insert the partial batch jdbcDBClient.cleanup(); // Prevent a teardown() from printing an error jdbcDBClient = null; // Check that we have all rows assertNumRows(numRows); } catch (SQLException e) { e.printStackTrace(); fail("Failed insertBatchTest"); } finally { teardown(); // for next tests setup(); } } private void assertNumRows(long numRows) throws SQLException { ResultSet resultSet = jdbcConnection.prepareStatement( String.format("SELECT * FROM %s", TABLE_NAME) ).executeQuery(); for (int i = 0; i < numRows; i++) { assertTrue("expecting " + numRows + " results, received only " + i, resultSet.next()); } assertFalse("expecting " + numRows + " results, received more", resultSet.next()); resultSet.close(); } }
14,830
36.642132
161
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2014 - 2016, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for stores that can be accessed via JDBC. */ package site.ycsb.db;
753
31.782609
70
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/JdbcDBCli.java
/** * Copyright (c) 2010 - 2016 Yahoo! Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import java.io.FileInputStream; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Enumeration; import java.util.Properties; /** * Execute a JDBC command line. * * @author sudipto */ public final class JdbcDBCli { private static void usageMessage() { System.out.println("JdbcCli. Options:"); System.out.println(" -p key=value properties defined."); System.out.println(" -P location of the properties file to load."); System.out.println(" -c SQL command to execute."); } private static void executeCommand(Properties props, String sql) throws SQLException { String driver = props.getProperty(JdbcDBClient.DRIVER_CLASS); String username = props.getProperty(JdbcDBClient.CONNECTION_USER); String password = props.getProperty(JdbcDBClient.CONNECTION_PASSWD, ""); String url = props.getProperty(JdbcDBClient.CONNECTION_URL); if (driver == null || username == null || url == null) { throw new SQLException("Missing connection information."); } Connection conn = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, username, password); Statement stmt = conn.createStatement(); stmt.execute(sql); System.out.println("Command \"" + sql + "\" successfully executed."); } catch (ClassNotFoundException e) { throw new SQLException("JDBC Driver class not found."); } finally { if (conn != null) { System.out.println("Closing database connection."); conn.close(); } } } /** * @param args */ public static void main(String[] args) { if (args.length == 0) { usageMessage(); System.exit(0); } Properties props = new Properties(); Properties fileprops = new Properties(); String sql = null; // parse arguments int argindex = 0; while (args[argindex].startsWith("-")) { if (args[argindex].compareTo("-P") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } String propfile = args[argindex]; argindex++; Properties myfileprops = new Properties(); try { myfileprops.load(new FileInputStream(propfile)); } catch (IOException e) { System.out.println(e.getMessage()); System.exit(0); } // Issue #5 - remove call to stringPropertyNames to make compilable // under Java 1.5 for (Enumeration<?> e = myfileprops.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, myfileprops.getProperty(prop)); } } else if (args[argindex].compareTo("-p") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } int eq = args[argindex].indexOf('='); if (eq < 0) { usageMessage(); System.exit(0); } String name = args[argindex].substring(0, eq); String value = args[argindex].substring(eq + 1); props.put(name, value); argindex++; } else if (args[argindex].compareTo("-c") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } sql = args[argindex++]; } else { System.out.println("Unknown option " + args[argindex]); usageMessage(); System.exit(0); } if (argindex >= args.length) { break; } } if (argindex != args.length) { usageMessage(); System.exit(0); } // overwrite file properties with properties from the command line // Issue #5 - remove call to stringPropertyNames to make compilable under // Java 1.5 for (Enumeration<?> e = props.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, props.getProperty(prop)); } if (sql == null) { System.err.println("Missing command."); usageMessage(); System.exit(1); } try { executeCommand(fileprops, sql); } catch (SQLException e) { System.err.println("Error in executing command. " + e); System.exit(1); } } /** * Hidden constructor. */ private JdbcDBCli() { super(); } }
5,184
27.489011
88
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/JdbcDBCreateTable.java
/** * Copyright (c) 2010 - 2016 Yahoo! Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import java.io.FileInputStream; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Enumeration; import java.util.Properties; /** * Utility class to create the table to be used by the benchmark. * * @author sudipto */ public final class JdbcDBCreateTable { private static void usageMessage() { System.out.println("Create Table Client. Options:"); System.out.println(" -p key=value properties defined."); System.out.println(" -P location of the properties file to load."); System.out.println(" -n name of the table."); System.out.println(" -f number of fields (default 10)."); } private static void createTable(Properties props, String tablename) throws SQLException { String driver = props.getProperty(JdbcDBClient.DRIVER_CLASS); String username = props.getProperty(JdbcDBClient.CONNECTION_USER); String password = props.getProperty(JdbcDBClient.CONNECTION_PASSWD, ""); String url = props.getProperty(JdbcDBClient.CONNECTION_URL); int fieldcount = Integer.parseInt(props.getProperty(JdbcDBClient.FIELD_COUNT_PROPERTY, JdbcDBClient.FIELD_COUNT_PROPERTY_DEFAULT)); if (driver == null || username == null || url == null) { throw new SQLException("Missing connection information."); } Connection conn = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, username, password); Statement stmt = conn.createStatement(); StringBuilder sql = new StringBuilder("DROP TABLE IF EXISTS "); sql.append(tablename); sql.append(";"); stmt.execute(sql.toString()); sql = new StringBuilder("CREATE TABLE "); sql.append(tablename); sql.append(" (YCSB_KEY VARCHAR PRIMARY KEY"); for (int idx = 0; idx < fieldcount; idx++) { sql.append(", FIELD"); sql.append(idx); sql.append(" TEXT"); } sql.append(");"); stmt.execute(sql.toString()); System.out.println("Table " + tablename + " created.."); } catch (ClassNotFoundException e) { throw new SQLException("JDBC Driver class not found."); } finally { if (conn != null) { System.out.println("Closing database connection."); conn.close(); } } } /** * @param args */ public static void main(String[] args) { if (args.length == 0) { usageMessage(); System.exit(0); } String tablename = null; int fieldcount = -1; Properties props = new Properties(); Properties fileprops = new Properties(); // parse arguments int argindex = 0; while (args[argindex].startsWith("-")) { if (args[argindex].compareTo("-P") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } String propfile = args[argindex]; argindex++; Properties myfileprops = new Properties(); try { myfileprops.load(new FileInputStream(propfile)); } catch (IOException e) { System.out.println(e.getMessage()); System.exit(0); } // Issue #5 - remove call to stringPropertyNames to make compilable // under Java 1.5 for (Enumeration<?> e = myfileprops.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, myfileprops.getProperty(prop)); } } else if (args[argindex].compareTo("-p") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } int eq = args[argindex].indexOf('='); if (eq < 0) { usageMessage(); System.exit(0); } String name = args[argindex].substring(0, eq); String value = args[argindex].substring(eq + 1); props.put(name, value); argindex++; } else if (args[argindex].compareTo("-n") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } tablename = args[argindex++]; } else if (args[argindex].compareTo("-f") == 0) { argindex++; if (argindex >= args.length) { usageMessage(); System.exit(0); } try { fieldcount = Integer.parseInt(args[argindex++]); } catch (NumberFormatException e) { System.err.println("Invalid number for field count"); usageMessage(); System.exit(1); } } else { System.out.println("Unknown option " + args[argindex]); usageMessage(); System.exit(0); } if (argindex >= args.length) { break; } } if (argindex != args.length) { usageMessage(); System.exit(0); } // overwrite file properties with properties from the command line // Issue #5 - remove call to stringPropertyNames to make compilable under // Java 1.5 for (Enumeration<?> e = props.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, props.getProperty(prop)); } props = fileprops; if (tablename == null) { System.err.println("table name missing."); usageMessage(); System.exit(1); } if (fieldcount > 0) { props.setProperty(JdbcDBClient.FIELD_COUNT_PROPERTY, String.valueOf(fieldcount)); } try { createTable(props, tablename); } catch (SQLException e) { System.err.println("Error in creating table. " + e); System.exit(1); } } /** * Hidden constructor. */ private JdbcDBCreateTable() { super(); } }
6,519
27.977778
91
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/StatementType.java
/** * Copyright (c) 2010 Yahoo! Inc., 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; /** * The statement type for the prepared statements. */ public class StatementType { enum Type { INSERT(1), DELETE(2), READ(3), UPDATE(4), SCAN(5); private final int internalType; private Type(int type) { internalType = type; } int getHashCode() { final int prime = 31; int result = 1; result = prime * result + internalType; return result; } } private Type type; private int shardIndex; private int numFields; private String tableName; private String fieldString; public StatementType(Type type, String tableName, int numFields, String fieldString, int shardIndex) { this.type = type; this.tableName = tableName; this.numFields = numFields; this.fieldString = fieldString; this.shardIndex = shardIndex; } public String getTableName() { return tableName; } public String getFieldString() { return fieldString; } public int getNumFields() { return numFields; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + numFields + 100 * shardIndex; result = prime * result + ((tableName == null) ? 0 : tableName.hashCode()); result = prime * result + ((type == null) ? 0 : type.getHashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } StatementType other = (StatementType) obj; if (numFields != other.numFields) { return false; } if (shardIndex != other.shardIndex) { return false; } if (tableName == null) { if (other.tableName != null) { return false; } } else if (!tableName.equals(other.tableName)) { return false; } if (type != other.type) { return false; } if (!fieldString.equals(other.fieldString)) { return false; } return true; } }
2,733
23.630631
104
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/JdbcDBClient.java
/** * Copyright (c) 2010 - 2016 Yahoo! Inc., 2016, 2019 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import java.sql.*; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import site.ycsb.db.flavors.DBFlavor; /** * A class that wraps a JDBC compliant database to allow it to be interfaced * with YCSB. This class extends {@link DB} and implements the database * interface used by YCSB client. * * <br> * Each client will have its own instance of this class. This client is not * thread safe. * * <br> * This interface expects a schema <key> <field1> <field2> <field3> ... All * attributes are of type TEXT. All accesses are through the primary key. * Therefore, only one index on the primary key is needed. */ public class JdbcDBClient extends DB { /** The class to use as the jdbc driver. */ public static final String DRIVER_CLASS = "db.driver"; /** The URL to connect to the database. */ public static final String CONNECTION_URL = "db.url"; /** The user name to use to connect to the database. */ public static final String CONNECTION_USER = "db.user"; /** The password to use for establishing the connection. */ public static final String CONNECTION_PASSWD = "db.passwd"; /** The batch size for batched inserts. Set to >0 to use batching */ public static final String DB_BATCH_SIZE = "db.batchsize"; /** The JDBC fetch size hinted to the driver. */ public static final String JDBC_FETCH_SIZE = "jdbc.fetchsize"; /** The JDBC connection auto-commit property for the driver. */ public static final String JDBC_AUTO_COMMIT = "jdbc.autocommit"; public static final String JDBC_BATCH_UPDATES = "jdbc.batchupdateapi"; /** The name of the property for the number of fields in a record. */ public static final String FIELD_COUNT_PROPERTY = "fieldcount"; /** Default number of fields in a record. */ public static final String FIELD_COUNT_PROPERTY_DEFAULT = "10"; /** Representing a NULL value. */ public static final String NULL_VALUE = "NULL"; /** The primary key in the user table. */ public static final String PRIMARY_KEY = "YCSB_KEY"; /** The field name prefix in the table. */ public static final String COLUMN_PREFIX = "FIELD"; /** SQL:2008 standard: FETCH FIRST n ROWS after the ORDER BY. */ private boolean sqlansiScans = false; /** SQL Server before 2012: TOP n after the SELECT. */ private boolean sqlserverScans = false; private List<Connection> conns; private boolean initialized = false; private Properties props; private int jdbcFetchSize; private int batchSize; private boolean autoCommit; private boolean batchUpdates; private static final String DEFAULT_PROP = ""; private ConcurrentMap<StatementType, PreparedStatement> cachedStatements; private long numRowsInBatch = 0; /** DB flavor defines DB-specific syntax and behavior for the * particular database. Current database flavors are: {default, phoenix} */ private DBFlavor dbFlavor; /** * Ordered field information for insert and update statements. */ private static class OrderedFieldInfo { private String fieldKeys; private List<String> fieldValues; OrderedFieldInfo(String fieldKeys, List<String> fieldValues) { this.fieldKeys = fieldKeys; this.fieldValues = fieldValues; } String getFieldKeys() { return fieldKeys; } List<String> getFieldValues() { return fieldValues; } } /** * For the given key, returns what shard contains data for this key. * * @param key Data key to do operation on * @return Shard index */ private int getShardIndexByKey(String key) { int ret = Math.abs(key.hashCode()) % conns.size(); return ret; } /** * For the given key, returns Connection object that holds connection to the * shard that contains this key. * * @param key Data key to get information for * @return Connection object */ private Connection getShardConnectionByKey(String key) { return conns.get(getShardIndexByKey(key)); } private void cleanupAllConnections() throws SQLException { for (Connection conn : conns) { if (!autoCommit) { conn.commit(); } conn.close(); } } /** Returns parsed int value from the properties if set, otherwise returns -1. */ private static int getIntProperty(Properties props, String key) throws DBException { String valueStr = props.getProperty(key); if (valueStr != null) { try { return Integer.parseInt(valueStr); } catch (NumberFormatException nfe) { System.err.println("Invalid " + key + " specified: " + valueStr); throw new DBException(nfe); } } return -1; } /** Returns parsed boolean value from the properties if set, otherwise returns defaultVal. */ private static boolean getBoolProperty(Properties props, String key, boolean defaultVal) { String valueStr = props.getProperty(key); if (valueStr != null) { return Boolean.parseBoolean(valueStr); } return defaultVal; } @Override public void init() throws DBException { if (initialized) { System.err.println("Client connection already initialized."); return; } props = getProperties(); String urls = props.getProperty(CONNECTION_URL, DEFAULT_PROP); String user = props.getProperty(CONNECTION_USER, DEFAULT_PROP); String passwd = props.getProperty(CONNECTION_PASSWD, DEFAULT_PROP); String driver = props.getProperty(DRIVER_CLASS); this.jdbcFetchSize = getIntProperty(props, JDBC_FETCH_SIZE); this.batchSize = getIntProperty(props, DB_BATCH_SIZE); this.autoCommit = getBoolProperty(props, JDBC_AUTO_COMMIT, true); this.batchUpdates = getBoolProperty(props, JDBC_BATCH_UPDATES, false); try { // The SQL Syntax for Scan depends on the DB engine // - SQL:2008 standard: FETCH FIRST n ROWS after the ORDER BY // - SQL Server before 2012: TOP n after the SELECT // - others (MySQL,MariaDB, PostgreSQL before 8.4) // TODO: check product name and version rather than driver name if (driver != null) { if (driver.contains("sqlserver")) { sqlserverScans = true; sqlansiScans = false; } if (driver.contains("oracle")) { sqlserverScans = false; sqlansiScans = true; } if (driver.contains("postgres")) { sqlserverScans = false; sqlansiScans = true; } Class.forName(driver); } int shardCount = 0; conns = new ArrayList<Connection>(3); // for a longer explanation see the README.md // semicolons aren't present in JDBC urls, so we use them to delimit // multiple JDBC connections to shard across. final String[] urlArr = urls.split(";"); for (String url : urlArr) { System.out.println("Adding shard node URL: " + url); Connection conn = DriverManager.getConnection(url, user, passwd); // Since there is no explicit commit method in the DB interface, all // operations should auto commit, except when explicitly told not to // (this is necessary in cases such as for PostgreSQL when running a // scan workload with fetchSize) conn.setAutoCommit(autoCommit); shardCount++; conns.add(conn); } System.out.println("Using shards: " + shardCount + ", batchSize:" + batchSize + ", fetchSize: " + jdbcFetchSize); cachedStatements = new ConcurrentHashMap<StatementType, PreparedStatement>(); this.dbFlavor = DBFlavor.fromJdbcUrl(urlArr[0]); } catch (ClassNotFoundException e) { System.err.println("Error in initializing the JDBS driver: " + e); throw new DBException(e); } catch (SQLException e) { System.err.println("Error in database operation: " + e); throw new DBException(e); } catch (NumberFormatException e) { System.err.println("Invalid value for fieldcount property. " + e); throw new DBException(e); } initialized = true; } @Override public void cleanup() throws DBException { if (batchSize > 0) { try { // commit un-finished batches for (PreparedStatement st : cachedStatements.values()) { if (!st.getConnection().isClosed() && !st.isClosed() && (numRowsInBatch % batchSize != 0)) { st.executeBatch(); } } } catch (SQLException e) { System.err.println("Error in cleanup execution. " + e); throw new DBException(e); } } try { cleanupAllConnections(); } catch (SQLException e) { System.err.println("Error in closing the connection. " + e); throw new DBException(e); } } private PreparedStatement createAndCacheInsertStatement(StatementType insertType, String key) throws SQLException { String insert = dbFlavor.createInsertStatement(insertType, key); PreparedStatement insertStatement = getShardConnectionByKey(key).prepareStatement(insert); PreparedStatement stmt = cachedStatements.putIfAbsent(insertType, insertStatement); if (stmt == null) { return insertStatement; } return stmt; } private PreparedStatement createAndCacheReadStatement(StatementType readType, String key) throws SQLException { String read = dbFlavor.createReadStatement(readType, key); PreparedStatement readStatement = getShardConnectionByKey(key).prepareStatement(read); PreparedStatement stmt = cachedStatements.putIfAbsent(readType, readStatement); if (stmt == null) { return readStatement; } return stmt; } private PreparedStatement createAndCacheDeleteStatement(StatementType deleteType, String key) throws SQLException { String delete = dbFlavor.createDeleteStatement(deleteType, key); PreparedStatement deleteStatement = getShardConnectionByKey(key).prepareStatement(delete); PreparedStatement stmt = cachedStatements.putIfAbsent(deleteType, deleteStatement); if (stmt == null) { return deleteStatement; } return stmt; } private PreparedStatement createAndCacheUpdateStatement(StatementType updateType, String key) throws SQLException { String update = dbFlavor.createUpdateStatement(updateType, key); PreparedStatement insertStatement = getShardConnectionByKey(key).prepareStatement(update); PreparedStatement stmt = cachedStatements.putIfAbsent(updateType, insertStatement); if (stmt == null) { return insertStatement; } return stmt; } private PreparedStatement createAndCacheScanStatement(StatementType scanType, String key) throws SQLException { String select = dbFlavor.createScanStatement(scanType, key, sqlserverScans, sqlansiScans); PreparedStatement scanStatement = getShardConnectionByKey(key).prepareStatement(select); if (this.jdbcFetchSize > 0) { scanStatement.setFetchSize(this.jdbcFetchSize); } PreparedStatement stmt = cachedStatements.putIfAbsent(scanType, scanStatement); if (stmt == null) { return scanStatement; } return stmt; } @Override public Status read(String tableName, String key, Set<String> fields, Map<String, ByteIterator> result) { try { StatementType type = new StatementType(StatementType.Type.READ, tableName, 1, "", getShardIndexByKey(key)); PreparedStatement readStatement = cachedStatements.get(type); if (readStatement == null) { readStatement = createAndCacheReadStatement(type, key); } readStatement.setString(1, key); ResultSet resultSet = readStatement.executeQuery(); if (!resultSet.next()) { resultSet.close(); return Status.NOT_FOUND; } if (result != null && fields != null) { for (String field : fields) { String value = resultSet.getString(field); result.put(field, new StringByteIterator(value)); } } resultSet.close(); return Status.OK; } catch (SQLException e) { System.err.println("Error in processing read of table " + tableName + ": " + e); return Status.ERROR; } } @Override public Status scan(String tableName, String startKey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { StatementType type = new StatementType(StatementType.Type.SCAN, tableName, 1, "", getShardIndexByKey(startKey)); PreparedStatement scanStatement = cachedStatements.get(type); if (scanStatement == null) { scanStatement = createAndCacheScanStatement(type, startKey); } // SQL Server TOP syntax is at first if (sqlserverScans) { scanStatement.setInt(1, recordcount); scanStatement.setString(2, startKey); // FETCH FIRST and LIMIT are at the end } else { scanStatement.setString(1, startKey); scanStatement.setInt(2, recordcount); } ResultSet resultSet = scanStatement.executeQuery(); for (int i = 0; i < recordcount && resultSet.next(); i++) { if (result != null && fields != null) { HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); for (String field : fields) { String value = resultSet.getString(field); values.put(field, new StringByteIterator(value)); } result.add(values); } } resultSet.close(); return Status.OK; } catch (SQLException e) { System.err.println("Error in processing scan of table: " + tableName + e); return Status.ERROR; } } @Override public Status update(String tableName, String key, Map<String, ByteIterator> values) { try { int numFields = values.size(); OrderedFieldInfo fieldInfo = getFieldInfo(values); StatementType type = new StatementType(StatementType.Type.UPDATE, tableName, numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); PreparedStatement updateStatement = cachedStatements.get(type); if (updateStatement == null) { updateStatement = createAndCacheUpdateStatement(type, key); } int index = 1; for (String value: fieldInfo.getFieldValues()) { updateStatement.setString(index++, value); } updateStatement.setString(index, key); int result = updateStatement.executeUpdate(); if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing update to table: " + tableName + e); return Status.ERROR; } } @Override public Status insert(String tableName, String key, Map<String, ByteIterator> values) { try { int numFields = values.size(); OrderedFieldInfo fieldInfo = getFieldInfo(values); StatementType type = new StatementType(StatementType.Type.INSERT, tableName, numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); PreparedStatement insertStatement = cachedStatements.get(type); if (insertStatement == null) { insertStatement = createAndCacheInsertStatement(type, key); } insertStatement.setString(1, key); int index = 2; for (String value: fieldInfo.getFieldValues()) { insertStatement.setString(index++, value); } // Using the batch insert API if (batchUpdates) { insertStatement.addBatch(); // Check for a sane batch size if (batchSize > 0) { // Commit the batch after it grows beyond the configured size if (++numRowsInBatch % batchSize == 0) { int[] results = insertStatement.executeBatch(); for (int r : results) { // Acceptable values are 1 and SUCCESS_NO_INFO (-2) from reWriteBatchedInserts=true if (r != 1 && r != -2) { return Status.ERROR; } } // If autoCommit is off, make sure we commit the batch if (!autoCommit) { getShardConnectionByKey(key).commit(); } return Status.OK; } // else, the default value of -1 or a nonsense. Treat it as an infinitely large batch. } // else, we let the batch accumulate // Added element to the batch, potentially committing the batch too. return Status.BATCHED_OK; } else { // Normal update int result = insertStatement.executeUpdate(); // If we are not autoCommit, we might have to commit now if (!autoCommit) { // Let updates be batcher locally if (batchSize > 0) { if (++numRowsInBatch % batchSize == 0) { // Send the batch of updates getShardConnectionByKey(key).commit(); } // uhh return Status.OK; } else { // Commit each update getShardConnectionByKey(key).commit(); } } if (result == 1) { return Status.OK; } } return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing insert to table: " + tableName + e); return Status.ERROR; } } @Override public Status delete(String tableName, String key) { try { StatementType type = new StatementType(StatementType.Type.DELETE, tableName, 1, "", getShardIndexByKey(key)); PreparedStatement deleteStatement = cachedStatements.get(type); if (deleteStatement == null) { deleteStatement = createAndCacheDeleteStatement(type, key); } deleteStatement.setString(1, key); int result = deleteStatement.executeUpdate(); if (result == 1) { return Status.OK; } return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing delete to table: " + tableName + e); return Status.ERROR; } } private OrderedFieldInfo getFieldInfo(Map<String, ByteIterator> values) { String fieldKeys = ""; List<String> fieldValues = new ArrayList<>(); int count = 0; for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { fieldKeys += entry.getKey(); if (count < values.size() - 1) { fieldKeys += ","; } fieldValues.add(count, entry.getValue().toString()); count++; } return new OrderedFieldInfo(fieldKeys, fieldValues); } }
19,288
35.054206
119
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/flavors/package-info.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * This package contains a collection of database-specific overrides. This accounts for the variance * that can be present where JDBC does not explicitly define what a database must do or when a * database has a non-standard SQL implementation. */ package site.ycsb.db.flavors;
943
40.043478
100
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/flavors/DBFlavor.java
/** * Copyright (c) 2016, 2019 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.flavors; import site.ycsb.db.StatementType; /** * DBFlavor captures minor differences in syntax and behavior among JDBC implementations and SQL * dialects. This class also acts as a factory to instantiate concrete flavors based on the JDBC URL. */ public abstract class DBFlavor { enum DBName { DEFAULT, PHOENIX } private final DBName dbName; public DBFlavor(DBName dbName) { this.dbName = dbName; } public static DBFlavor fromJdbcUrl(String url) { if (url.startsWith("jdbc:phoenix")) { return new PhoenixDBFlavor(); } return new DefaultDBFlavor(); } /** * Create and return a SQL statement for inserting data. */ public abstract String createInsertStatement(StatementType insertType, String key); /** * Create and return a SQL statement for reading data. */ public abstract String createReadStatement(StatementType readType, String key); /** * Create and return a SQL statement for deleting data. */ public abstract String createDeleteStatement(StatementType deleteType, String key); /** * Create and return a SQL statement for updating data. */ public abstract String createUpdateStatement(StatementType updateType, String key); /** * Create and return a SQL statement for scanning data. */ public abstract String createScanStatement(StatementType scanType, String key, boolean sqlserverScans, boolean sqlansiScans); }
2,159
29.422535
101
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/flavors/DefaultDBFlavor.java
/** * Copyright (c) 2016, 2019 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.flavors; import site.ycsb.db.JdbcDBClient; import site.ycsb.db.StatementType; /** * A default flavor for relational databases. */ public class DefaultDBFlavor extends DBFlavor { public DefaultDBFlavor() { super(DBName.DEFAULT); } public DefaultDBFlavor(DBName dbName) { super(dbName); } @Override public String createInsertStatement(StatementType insertType, String key) { StringBuilder insert = new StringBuilder("INSERT INTO "); insert.append(insertType.getTableName()); insert.append(" (" + JdbcDBClient.PRIMARY_KEY + "," + insertType.getFieldString() + ")"); insert.append(" VALUES(?"); for (int i = 0; i < insertType.getNumFields(); i++) { insert.append(",?"); } insert.append(")"); return insert.toString(); } @Override public String createReadStatement(StatementType readType, String key) { StringBuilder read = new StringBuilder("SELECT * FROM "); read.append(readType.getTableName()); read.append(" WHERE "); read.append(JdbcDBClient.PRIMARY_KEY); read.append(" = "); read.append("?"); return read.toString(); } @Override public String createDeleteStatement(StatementType deleteType, String key) { StringBuilder delete = new StringBuilder("DELETE FROM "); delete.append(deleteType.getTableName()); delete.append(" WHERE "); delete.append(JdbcDBClient.PRIMARY_KEY); delete.append(" = ?"); return delete.toString(); } @Override public String createUpdateStatement(StatementType updateType, String key) { String[] fieldKeys = updateType.getFieldString().split(","); StringBuilder update = new StringBuilder("UPDATE "); update.append(updateType.getTableName()); update.append(" SET "); for (int i = 0; i < fieldKeys.length; i++) { update.append(fieldKeys[i]); update.append("=?"); if (i < fieldKeys.length - 1) { update.append(", "); } } update.append(" WHERE "); update.append(JdbcDBClient.PRIMARY_KEY); update.append(" = ?"); return update.toString(); } @Override public String createScanStatement(StatementType scanType, String key, boolean sqlserverScans, boolean sqlansiScans) { StringBuilder select; if (sqlserverScans) { select = new StringBuilder("SELECT TOP (?) * FROM "); } else { select = new StringBuilder("SELECT * FROM "); } select.append(scanType.getTableName()); select.append(" WHERE "); select.append(JdbcDBClient.PRIMARY_KEY); select.append(" >= ?"); select.append(" ORDER BY "); select.append(JdbcDBClient.PRIMARY_KEY); if (!sqlserverScans) { if (sqlansiScans) { select.append(" FETCH FIRST ? ROWS ONLY"); } else { select.append(" LIMIT ?"); } } return select.toString(); } }
3,501
30.836364
119
java
null
NearPMSW-main/baseline/logging/YCSB2/jdbc/src/main/java/site/ycsb/db/flavors/PhoenixDBFlavor.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.flavors; import site.ycsb.db.JdbcDBClient; import site.ycsb.db.StatementType; /** * Database flavor for Apache Phoenix. Captures syntax differences used by Phoenix. */ public class PhoenixDBFlavor extends DefaultDBFlavor { public PhoenixDBFlavor() { super(DBName.PHOENIX); } @Override public String createInsertStatement(StatementType insertType, String key) { // Phoenix uses UPSERT syntax StringBuilder insert = new StringBuilder("UPSERT INTO "); insert.append(insertType.getTableName()); insert.append(" (" + JdbcDBClient.PRIMARY_KEY + "," + insertType.getFieldString() + ")"); insert.append(" VALUES(?"); for (int i = 0; i < insertType.getNumFields(); i++) { insert.append(",?"); } insert.append(")"); return insert.toString(); } @Override public String createUpdateStatement(StatementType updateType, String key) { // Phoenix doesn't have UPDATE semantics, just re-use UPSERT VALUES on the specific columns String[] fieldKeys = updateType.getFieldString().split(","); StringBuilder update = new StringBuilder("UPSERT INTO "); update.append(updateType.getTableName()); update.append(" ("); // Each column to update for (int i = 0; i < fieldKeys.length; i++) { update.append(fieldKeys[i]).append(","); } // And then set the primary key column update.append(JdbcDBClient.PRIMARY_KEY).append(") VALUES("); // Add an unbound param for each column to update for (int i = 0; i < fieldKeys.length; i++) { update.append("?, "); } // Then the primary key column's value update.append("?)"); return update.toString(); } }
2,339
34.454545
95
java
null
NearPMSW-main/baseline/logging/YCSB2/cassandra/src/test/java/site/ycsb/db/CassandraCQLClientTest.java
/** * Copyright (c) 2015 YCSB contributors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import com.google.common.collect.Sets; import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.Statement; import com.datastax.driver.core.querybuilder.Insert; import com.datastax.driver.core.querybuilder.QueryBuilder; import com.datastax.driver.core.querybuilder.Select; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.measurements.Measurements; import site.ycsb.workloads.CoreWorkload; import org.cassandraunit.CassandraCQLUnit; import org.cassandraunit.dataset.cql.ClassPathCQLDataSet; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; /** * Integration tests for the Cassandra client */ public class CassandraCQLClientTest { // Change the default Cassandra timeout from 10s to 120s for slow CI machines private final static long timeout = 120000L; private final static String TABLE = "usertable"; private final static String HOST = "localhost"; private final static int PORT = 9142; private final static String DEFAULT_ROW_KEY = "user1"; private CassandraCQLClient client; private Session session; @ClassRule public static CassandraCQLUnit cassandraUnit = new CassandraCQLUnit( new ClassPathCQLDataSet("ycsb.cql", "ycsb"), null, timeout); @Before public void setUp() throws Exception { session = cassandraUnit.getSession(); Properties p = new Properties(); p.setProperty("hosts", HOST); p.setProperty("port", Integer.toString(PORT)); p.setProperty("table", TABLE); Measurements.setProperties(p); final CoreWorkload workload = new CoreWorkload(); workload.init(p); client = new CassandraCQLClient(); client.setProperties(p); client.init(); } @After public void tearDownClient() throws Exception { if (client != null) { client.cleanup(); } client = null; } @After public void clearTable() throws Exception { // Clear the table so that each test starts fresh. final Statement truncate = QueryBuilder.truncate(TABLE); if (cassandraUnit != null) { cassandraUnit.getSession().execute(truncate); } } @Test public void testReadMissingRow() throws Exception { final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); final Status status = client.read(TABLE, "Missing row", null, result); assertThat(result.size(), is(0)); assertThat(status, is(Status.NOT_FOUND)); } private void insertRow() { final String rowKey = DEFAULT_ROW_KEY; Insert insertStmt = QueryBuilder.insertInto(TABLE); insertStmt.value(CassandraCQLClient.YCSB_KEY, rowKey); insertStmt.value("field0", "value1"); insertStmt.value("field1", "value2"); session.execute(insertStmt); } @Test public void testRead() throws Exception { insertRow(); final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); final Status status = client.read(TABLE, DEFAULT_ROW_KEY, null, result); assertThat(status, is(Status.OK)); assertThat(result.entrySet(), hasSize(11)); assertThat(result, hasEntry("field2", null)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry(CassandraCQLClient.YCSB_KEY, DEFAULT_ROW_KEY)); assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2")); } @Test public void testReadSingleColumn() throws Exception { insertRow(); final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); final Set<String> fields = Sets.newHashSet("field1"); final Status status = client.read(TABLE, DEFAULT_ROW_KEY, fields, result); assertThat(status, is(Status.OK)); assertThat(result.entrySet(), hasSize(1)); final Map<String, String> strResult = StringByteIterator.getStringMap(result); assertThat(strResult, hasEntry("field1", "value2")); } @Test public void testInsert() throws Exception { final String key = "key"; final Map<String, String> input = new HashMap<String, String>(); input.put("field0", "value1"); input.put("field1", "value2"); final Status status = client.insert(TABLE, key, StringByteIterator.getByteIteratorMap(input)); assertThat(status, is(Status.OK)); // Verify result final Select selectStmt = QueryBuilder.select("field0", "field1") .from(TABLE) .where(QueryBuilder.eq(CassandraCQLClient.YCSB_KEY, key)) .limit(1); final ResultSet rs = session.execute(selectStmt); final Row row = rs.one(); assertThat(row, notNullValue()); assertThat(rs.isExhausted(), is(true)); assertThat(row.getString("field0"), is("value1")); assertThat(row.getString("field1"), is("value2")); } @Test public void testUpdate() throws Exception { insertRow(); final Map<String, String> input = new HashMap<String, String>(); input.put("field0", "new-value1"); input.put("field1", "new-value2"); final Status status = client.update(TABLE, DEFAULT_ROW_KEY, StringByteIterator.getByteIteratorMap(input)); assertThat(status, is(Status.OK)); // Verify result final Select selectStmt = QueryBuilder.select("field0", "field1") .from(TABLE) .where(QueryBuilder.eq(CassandraCQLClient.YCSB_KEY, DEFAULT_ROW_KEY)) .limit(1); final ResultSet rs = session.execute(selectStmt); final Row row = rs.one(); assertThat(row, notNullValue()); assertThat(rs.isExhausted(), is(true)); assertThat(row.getString("field0"), is("new-value1")); assertThat(row.getString("field1"), is("new-value2")); } @Test public void testDelete() throws Exception { insertRow(); final Status status = client.delete(TABLE, DEFAULT_ROW_KEY); assertThat(status, is(Status.OK)); // Verify result final Select selectStmt = QueryBuilder.select("field0", "field1") .from(TABLE) .where(QueryBuilder.eq(CassandraCQLClient.YCSB_KEY, DEFAULT_ROW_KEY)) .limit(1); final ResultSet rs = session.execute(selectStmt); final Row row = rs.one(); assertThat(row, nullValue()); } @Test public void testPreparedStatements() throws Exception { final int LOOP_COUNT = 3; for (int i = 0; i < LOOP_COUNT; i++) { testInsert(); testUpdate(); testRead(); testReadSingleColumn(); testReadMissingRow(); testDelete(); } } }
7,941
31.818182
98
java
null
NearPMSW-main/baseline/logging/YCSB2/cassandra/src/main/java/site/ycsb/db/CassandraCQLClient.java
/** * Copyright (c) 2013-2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. * * Submitted by Chrisjan Matser on 10/11/2010. */ package site.ycsb.db; import com.datastax.driver.core.Cluster; import com.datastax.driver.core.ColumnDefinitions; import com.datastax.driver.core.ConsistencyLevel; import com.datastax.driver.core.Host; import com.datastax.driver.core.HostDistance; import com.datastax.driver.core.Metadata; import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.querybuilder.Insert; import com.datastax.driver.core.querybuilder.QueryBuilder; import com.datastax.driver.core.querybuilder.Select; import com.datastax.driver.core.querybuilder.Update; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.helpers.MessageFormatter; /** * Cassandra 2.x CQL client. * * See {@code cassandra2/README.md} for details. * * @author cmatser */ public class CassandraCQLClient extends DB { private static Logger logger = LoggerFactory.getLogger(CassandraCQLClient.class); private static Cluster cluster = null; private static Session session = null; private static ConcurrentMap<Set<String>, PreparedStatement> readStmts = new ConcurrentHashMap<Set<String>, PreparedStatement>(); private static ConcurrentMap<Set<String>, PreparedStatement> scanStmts = new ConcurrentHashMap<Set<String>, PreparedStatement>(); private static ConcurrentMap<Set<String>, PreparedStatement> insertStmts = new ConcurrentHashMap<Set<String>, PreparedStatement>(); private static ConcurrentMap<Set<String>, PreparedStatement> updateStmts = new ConcurrentHashMap<Set<String>, PreparedStatement>(); private static AtomicReference<PreparedStatement> readAllStmt = new AtomicReference<PreparedStatement>(); private static AtomicReference<PreparedStatement> scanAllStmt = new AtomicReference<PreparedStatement>(); private static AtomicReference<PreparedStatement> deleteStmt = new AtomicReference<PreparedStatement>(); private static ConsistencyLevel readConsistencyLevel = ConsistencyLevel.QUORUM; private static ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.QUORUM; public static final String YCSB_KEY = "y_id"; public static final String KEYSPACE_PROPERTY = "cassandra.keyspace"; public static final String KEYSPACE_PROPERTY_DEFAULT = "ycsb"; public static final String USERNAME_PROPERTY = "cassandra.username"; public static final String PASSWORD_PROPERTY = "cassandra.password"; public static final String HOSTS_PROPERTY = "hosts"; public static final String PORT_PROPERTY = "port"; public static final String PORT_PROPERTY_DEFAULT = "9042"; public static final String READ_CONSISTENCY_LEVEL_PROPERTY = "cassandra.readconsistencylevel"; public static final String READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = readConsistencyLevel.name(); public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = "cassandra.writeconsistencylevel"; public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = writeConsistencyLevel.name(); public static final String MAX_CONNECTIONS_PROPERTY = "cassandra.maxconnections"; public static final String CORE_CONNECTIONS_PROPERTY = "cassandra.coreconnections"; public static final String CONNECT_TIMEOUT_MILLIS_PROPERTY = "cassandra.connecttimeoutmillis"; public static final String READ_TIMEOUT_MILLIS_PROPERTY = "cassandra.readtimeoutmillis"; public static final String TRACING_PROPERTY = "cassandra.tracing"; public static final String TRACING_PROPERTY_DEFAULT = "false"; public static final String USE_SSL_CONNECTION = "cassandra.useSSL"; private static final String DEFAULT_USE_SSL_CONNECTION = "false"; /** * Count the number of times initialized to teardown on the last * {@link #cleanup()}. */ private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); private static boolean debug = false; private static boolean trace = false; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { // Keep track of number of calls to init (for later cleanup) INIT_COUNT.incrementAndGet(); // Synchronized so that we only have a single // cluster/session instance for all the threads. synchronized (INIT_COUNT) { // Check if the cluster has already been initialized if (cluster != null) { return; } try { debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); trace = Boolean.valueOf(getProperties().getProperty(TRACING_PROPERTY, TRACING_PROPERTY_DEFAULT)); String host = getProperties().getProperty(HOSTS_PROPERTY); if (host == null) { throw new DBException(String.format( "Required property \"%s\" missing for CassandraCQLClient", HOSTS_PROPERTY)); } String[] hosts = host.split(","); String port = getProperties().getProperty(PORT_PROPERTY, PORT_PROPERTY_DEFAULT); String username = getProperties().getProperty(USERNAME_PROPERTY); String password = getProperties().getProperty(PASSWORD_PROPERTY); String keyspace = getProperties().getProperty(KEYSPACE_PROPERTY, KEYSPACE_PROPERTY_DEFAULT); readConsistencyLevel = ConsistencyLevel.valueOf( getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); writeConsistencyLevel = ConsistencyLevel.valueOf( getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); Boolean useSSL = Boolean.parseBoolean(getProperties().getProperty(USE_SSL_CONNECTION, DEFAULT_USE_SSL_CONNECTION)); if ((username != null) && !username.isEmpty()) { Cluster.Builder clusterBuilder = Cluster.builder().withCredentials(username, password) .withPort(Integer.valueOf(port)).addContactPoints(hosts); if (useSSL) { clusterBuilder = clusterBuilder.withSSL(); } cluster = clusterBuilder.build(); } else { cluster = Cluster.builder().withPort(Integer.valueOf(port)) .addContactPoints(hosts).build(); } String maxConnections = getProperties().getProperty( MAX_CONNECTIONS_PROPERTY); if (maxConnections != null) { cluster.getConfiguration().getPoolingOptions() .setMaxConnectionsPerHost(HostDistance.LOCAL, Integer.valueOf(maxConnections)); } String coreConnections = getProperties().getProperty( CORE_CONNECTIONS_PROPERTY); if (coreConnections != null) { cluster.getConfiguration().getPoolingOptions() .setCoreConnectionsPerHost(HostDistance.LOCAL, Integer.valueOf(coreConnections)); } String connectTimoutMillis = getProperties().getProperty( CONNECT_TIMEOUT_MILLIS_PROPERTY); if (connectTimoutMillis != null) { cluster.getConfiguration().getSocketOptions() .setConnectTimeoutMillis(Integer.valueOf(connectTimoutMillis)); } String readTimoutMillis = getProperties().getProperty( READ_TIMEOUT_MILLIS_PROPERTY); if (readTimoutMillis != null) { cluster.getConfiguration().getSocketOptions() .setReadTimeoutMillis(Integer.valueOf(readTimoutMillis)); } Metadata metadata = cluster.getMetadata(); logger.info("Connected to cluster: {}\n", metadata.getClusterName()); for (Host discoveredHost : metadata.getAllHosts()) { logger.info("Datacenter: {}; Host: {}; Rack: {}\n", discoveredHost.getDatacenter(), discoveredHost.getAddress(), discoveredHost.getRack()); } session = cluster.connect(keyspace); } catch (Exception e) { throw new DBException(e); } } // synchronized } /** * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ @Override public void cleanup() throws DBException { synchronized (INIT_COUNT) { final int curInitCount = INIT_COUNT.decrementAndGet(); if (curInitCount <= 0) { readStmts.clear(); scanStmts.clear(); insertStmts.clear(); updateStmts.clear(); readAllStmt.set(null); scanAllStmt.set(null); deleteStmt.set(null); session.close(); cluster.close(); cluster = null; session = null; } if (curInitCount < 0) { // This should never happen. throw new DBException( String.format("initCount is negative: %d", curInitCount)); } } } /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table * The name of the table * @param key * The record key of the record to read. * @param fields * The list of fields to read, or null for all of them * @param result * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { PreparedStatement stmt = (fields == null) ? readAllStmt.get() : readStmts.get(fields); // Prepare statement on demand if (stmt == null) { Select.Builder selectBuilder; if (fields == null) { selectBuilder = QueryBuilder.select().all(); } else { selectBuilder = QueryBuilder.select(); for (String col : fields) { ((Select.Selection) selectBuilder).column(col); } } stmt = session.prepare(selectBuilder.from(table) .where(QueryBuilder.eq(YCSB_KEY, QueryBuilder.bindMarker())) .limit(1)); stmt.setConsistencyLevel(readConsistencyLevel); if (trace) { stmt.enableTracing(); } PreparedStatement prevStmt = (fields == null) ? readAllStmt.getAndSet(stmt) : readStmts.putIfAbsent(new HashSet(fields), stmt); if (prevStmt != null) { stmt = prevStmt; } } logger.debug(stmt.getQueryString()); logger.debug("key = {}", key); ResultSet rs = session.execute(stmt.bind(key)); if (rs.isExhausted()) { return Status.NOT_FOUND; } // Should be only 1 row Row row = rs.one(); ColumnDefinitions cd = row.getColumnDefinitions(); for (ColumnDefinitions.Definition def : cd) { ByteBuffer val = row.getBytesUnsafe(def.getName()); if (val != null) { result.put(def.getName(), new ByteArrayByteIterator(val.array())); } else { result.put(def.getName(), null); } } return Status.OK; } catch (Exception e) { logger.error(MessageFormatter.format("Error reading key: {}", key).getMessage(), e); return Status.ERROR; } } /** * Perform a range scan for a set of records in the database. Each field/value * pair from the result will be stored in a HashMap. * * Cassandra CQL uses "token" method for range scan which doesn't always yield * intuitive results. * * @param table * The name of the table * @param startkey * The record key of the first record to read. * @param recordcount * The number of records to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one record * @return Zero on success, a non-zero error code on error */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { PreparedStatement stmt = (fields == null) ? scanAllStmt.get() : scanStmts.get(fields); // Prepare statement on demand if (stmt == null) { Select.Builder selectBuilder; if (fields == null) { selectBuilder = QueryBuilder.select().all(); } else { selectBuilder = QueryBuilder.select(); for (String col : fields) { ((Select.Selection) selectBuilder).column(col); } } Select selectStmt = selectBuilder.from(table); // The statement builder is not setup right for tokens. // So, we need to build it manually. String initialStmt = selectStmt.toString(); StringBuilder scanStmt = new StringBuilder(); scanStmt.append(initialStmt.substring(0, initialStmt.length() - 1)); scanStmt.append(" WHERE "); scanStmt.append(QueryBuilder.token(YCSB_KEY)); scanStmt.append(" >= "); scanStmt.append("token("); scanStmt.append(QueryBuilder.bindMarker()); scanStmt.append(")"); scanStmt.append(" LIMIT "); scanStmt.append(QueryBuilder.bindMarker()); stmt = session.prepare(scanStmt.toString()); stmt.setConsistencyLevel(readConsistencyLevel); if (trace) { stmt.enableTracing(); } PreparedStatement prevStmt = (fields == null) ? scanAllStmt.getAndSet(stmt) : scanStmts.putIfAbsent(new HashSet(fields), stmt); if (prevStmt != null) { stmt = prevStmt; } } logger.debug(stmt.getQueryString()); logger.debug("startKey = {}, recordcount = {}", startkey, recordcount); ResultSet rs = session.execute(stmt.bind(startkey, Integer.valueOf(recordcount))); HashMap<String, ByteIterator> tuple; while (!rs.isExhausted()) { Row row = rs.one(); tuple = new HashMap<String, ByteIterator>(); ColumnDefinitions cd = row.getColumnDefinitions(); for (ColumnDefinitions.Definition def : cd) { ByteBuffer val = row.getBytesUnsafe(def.getName()); if (val != null) { tuple.put(def.getName(), new ByteArrayByteIterator(val.array())); } else { tuple.put(def.getName(), null); } } result.add(tuple); } return Status.OK; } catch (Exception e) { logger.error( MessageFormatter.format("Error scanning with startkey: {}", startkey).getMessage(), e); return Status.ERROR; } } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table * The name of the table * @param key * The record key of the record to write. * @param values * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { Set<String> fields = values.keySet(); PreparedStatement stmt = updateStmts.get(fields); // Prepare statement on demand if (stmt == null) { Update updateStmt = QueryBuilder.update(table); // Add fields for (String field : fields) { updateStmt.with(QueryBuilder.set(field, QueryBuilder.bindMarker())); } // Add key updateStmt.where(QueryBuilder.eq(YCSB_KEY, QueryBuilder.bindMarker())); stmt = session.prepare(updateStmt); stmt.setConsistencyLevel(writeConsistencyLevel); if (trace) { stmt.enableTracing(); } PreparedStatement prevStmt = updateStmts.putIfAbsent(new HashSet(fields), stmt); if (prevStmt != null) { stmt = prevStmt; } } if (logger.isDebugEnabled()) { logger.debug(stmt.getQueryString()); logger.debug("key = {}", key); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { logger.debug("{} = {}", entry.getKey(), entry.getValue()); } } // Add fields ColumnDefinitions vars = stmt.getVariables(); BoundStatement boundStmt = stmt.bind(); for (int i = 0; i < vars.size() - 1; i++) { boundStmt.setString(i, values.get(vars.getName(i)).toString()); } // Add key boundStmt.setString(vars.size() - 1, key); session.execute(boundStmt); return Status.OK; } catch (Exception e) { logger.error(MessageFormatter.format("Error updating key: {}", key).getMessage(), e); } return Status.ERROR; } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { Set<String> fields = values.keySet(); PreparedStatement stmt = insertStmts.get(fields); // Prepare statement on demand if (stmt == null) { Insert insertStmt = QueryBuilder.insertInto(table); // Add key insertStmt.value(YCSB_KEY, QueryBuilder.bindMarker()); // Add fields for (String field : fields) { insertStmt.value(field, QueryBuilder.bindMarker()); } stmt = session.prepare(insertStmt); stmt.setConsistencyLevel(writeConsistencyLevel); if (trace) { stmt.enableTracing(); } PreparedStatement prevStmt = insertStmts.putIfAbsent(new HashSet(fields), stmt); if (prevStmt != null) { stmt = prevStmt; } } if (logger.isDebugEnabled()) { logger.debug(stmt.getQueryString()); logger.debug("key = {}", key); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { logger.debug("{} = {}", entry.getKey(), entry.getValue()); } } // Add key BoundStatement boundStmt = stmt.bind().setString(0, key); // Add fields ColumnDefinitions vars = stmt.getVariables(); for (int i = 1; i < vars.size(); i++) { boundStmt.setString(i, values.get(vars.getName(i)).toString()); } session.execute(boundStmt); return Status.OK; } catch (Exception e) { logger.error(MessageFormatter.format("Error inserting key: {}", key).getMessage(), e); } return Status.ERROR; } /** * Delete a record from the database. * * @param table * The name of the table * @param key * The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ @Override public Status delete(String table, String key) { try { PreparedStatement stmt = deleteStmt.get(); // Prepare statement on demand if (stmt == null) { stmt = session.prepare(QueryBuilder.delete().from(table) .where(QueryBuilder.eq(YCSB_KEY, QueryBuilder.bindMarker()))); stmt.setConsistencyLevel(writeConsistencyLevel); if (trace) { stmt.enableTracing(); } PreparedStatement prevStmt = deleteStmt.getAndSet(stmt); if (prevStmt != null) { stmt = prevStmt; } } logger.debug(stmt.getQueryString()); logger.debug("key = {}", key); session.execute(stmt.bind(key)); return Status.OK; } catch (Exception e) { logger.error(MessageFormatter.format("Error deleting key: {}", key).getMessage(), e); } return Status.ERROR; } }
21,717
32.934375
105
java
null
NearPMSW-main/baseline/logging/YCSB2/cassandra/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://cassandra.apache.org/">Cassandra</a> * 2.1+ via CQL. */ package site.ycsb.db;
779
31.5
77
java
null
NearPMSW-main/baseline/logging/YCSB2/geode/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2014-2016, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * YCSB binding for <a href="https://geode.apache.org/">Apache Geode</a>. */ package site.ycsb.db;
762
33.681818
73
java
null
NearPMSW-main/baseline/logging/YCSB2/geode/src/main/java/site/ycsb/db/GeodeClient.java
/** * Copyright (c) 2013 - 2016 YCSB Contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import org.apache.geode.cache.Cache; import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionExistsException; import org.apache.geode.cache.RegionFactory; import org.apache.geode.cache.RegionShortcut; import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientCacheFactory; import org.apache.geode.cache.client.ClientRegionFactory; import org.apache.geode.cache.client.ClientRegionShortcut; import org.apache.geode.pdx.JSONFormatter; import org.apache.geode.pdx.PdxInstance; import org.apache.geode.pdx.PdxInstanceFactory; /** * Apache Geode client for the YCSB benchmark.<br /> * <p>By default acts as a Geode client and tries to connect * to Geode cache server running on localhost with default * cache server port. Hostname and port of a Geode cacheServer * can be provided using <code>geode.serverport=port</code> and <code> * geode.serverhost=host</code> properties on YCSB command line. * A locator may also be used for discovering a cacheServer * by using the property <code>geode.locator=host[port]</code></p> * <p> * <p>To run this client in a peer-to-peer topology with other Geode * nodes, use the property <code>geode.topology=p2p</code>. Running * in p2p mode will enable embedded caching in this client.</p> * <p> * <p>YCSB by default does its operations against "usertable". When running * as a client this is a <code>ClientRegionShortcut.PROXY</code> region, * when running in p2p mode it is a <code>RegionShortcut.PARTITION</code> * region. A cache.xml defining "usertable" region can be placed in the * working directory to override these region definitions.</p> */ public class GeodeClient extends DB { /** * property name of the port where Geode server is listening for connections. */ private static final String SERVERPORT_PROPERTY_NAME = "geode.serverport"; /** * property name of the host where Geode server is running. */ private static final String SERVERHOST_PROPERTY_NAME = "geode.serverhost"; /** * default value of {@link #SERVERHOST_PROPERTY_NAME}. */ private static final String SERVERHOST_PROPERTY_DEFAULT = "localhost"; /** * property name to specify a Geode locator. This property can be used in both * client server and p2p topology */ private static final String LOCATOR_PROPERTY_NAME = "geode.locator"; /** * property name to specify Geode topology. */ private static final String TOPOLOGY_PROPERTY_NAME = "geode.topology"; /** * value of {@value #TOPOLOGY_PROPERTY_NAME} when peer to peer topology should be used. * (client-server topology is default) */ private static final String TOPOLOGY_P2P_VALUE = "p2p"; /** * Pattern to split up a locator string in the form host[port]. */ private static final Pattern LOCATOR_PATTERN = Pattern.compile("(.+)\\[(\\d+)\\]");; private GemFireCache cache; /** * true if ycsb client runs as a client to a Geode cache server. */ private boolean isClient; @Override public void init() throws DBException { Properties props = getProperties(); // hostName where Geode cacheServer is running String serverHost = null; // port of Geode cacheServer int serverPort = 0; String locatorStr = null; if (props != null && !props.isEmpty()) { String serverPortStr = props.getProperty(SERVERPORT_PROPERTY_NAME); if (serverPortStr != null) { serverPort = Integer.parseInt(serverPortStr); } serverHost = props.getProperty(SERVERHOST_PROPERTY_NAME, SERVERHOST_PROPERTY_DEFAULT); locatorStr = props.getProperty(LOCATOR_PROPERTY_NAME); String topology = props.getProperty(TOPOLOGY_PROPERTY_NAME); if (topology != null && topology.equals(TOPOLOGY_P2P_VALUE)) { CacheFactory cf = new CacheFactory(); if (locatorStr != null) { cf.set("locators", locatorStr); } cache = cf.create(); isClient = false; return; } } isClient = true; ClientCacheFactory ccf = new ClientCacheFactory(); ccf.setPdxReadSerialized(true); if (serverPort != 0) { ccf.addPoolServer(serverHost, serverPort); } else { InetSocketAddress locatorAddress = getLocatorAddress(locatorStr); ccf.addPoolLocator(locatorAddress.getHostName(), locatorAddress.getPort()); } cache = ccf.create(); } static InetSocketAddress getLocatorAddress(String locatorStr) { Matcher matcher = LOCATOR_PATTERN.matcher(locatorStr); if(!matcher.matches()) { throw new IllegalStateException("Unable to parse locator: " + locatorStr); } return new InetSocketAddress(matcher.group(1), Integer.parseInt(matcher.group(2))); } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Region<String, PdxInstance> r = getRegion(table); PdxInstance val = r.get(key); if (val != null) { if (fields == null) { for (String fieldName : val.getFieldNames()) { result.put(fieldName, new ByteArrayByteIterator((byte[]) val.getField(fieldName))); } } else { for (String field : fields) { result.put(field, new ByteArrayByteIterator((byte[]) val.getField(field))); } } return Status.OK; } return Status.ERROR; } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { // Geode does not support scan return Status.ERROR; } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { getRegion(table).put(key, convertToBytearrayMap(values)); return Status.OK; } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { getRegion(table).put(key, convertToBytearrayMap(values)); return Status.OK; } @Override public Status delete(String table, String key) { getRegion(table).destroy(key); return Status.OK; } private PdxInstance convertToBytearrayMap(Map<String, ByteIterator> values) { PdxInstanceFactory pdxInstanceFactory = cache.createPdxInstanceFactory(JSONFormatter.JSON_CLASSNAME); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { pdxInstanceFactory.writeByteArray(entry.getKey(), entry.getValue().toArray()); } return pdxInstanceFactory.create(); } private Region<String, PdxInstance> getRegion(String table) { Region<String, PdxInstance> r = cache.getRegion(table); if (r == null) { try { if (isClient) { ClientRegionFactory<String, PdxInstance> crf = ((ClientCache) cache).createClientRegionFactory(ClientRegionShortcut.PROXY); r = crf.create(table); } else { RegionFactory<String, PdxInstance> rf = ((Cache) cache).createRegionFactory(RegionShortcut.PARTITION); r = rf.create(table); } } catch (RegionExistsException e) { // another thread created the region r = cache.getRegion(table); } } return r; } }
8,327
33.991597
112
java
null
NearPMSW-main/baseline/logging/YCSB2/kudu/src/main/java/site/ycsb/db/package-info.java
/** * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://kudu.apache.org/">Apache Kudu</a>. */ package site.ycsb.db;
770
32.521739
74
java
null
NearPMSW-main/baseline/logging/YCSB2/kudu/src/main/java/site/ycsb/db/KuduYCSBClient.java
/** * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import com.stumbleupon.async.TimeoutException; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.kudu.ColumnSchema; import org.apache.kudu.Schema; import org.apache.kudu.client.*; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.Vector; import static site.ycsb.Client.DEFAULT_RECORD_COUNT; import static site.ycsb.Client.RECORD_COUNT_PROPERTY; import static site.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY; import static site.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY_DEFAULT; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY; import static site.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY_DEFAULT; import static site.ycsb.workloads.CoreWorkload.ZERO_PADDING_PROPERTY; import static site.ycsb.workloads.CoreWorkload.ZERO_PADDING_PROPERTY_DEFAULT; import static org.apache.kudu.Type.STRING; import static org.apache.kudu.client.KuduPredicate.ComparisonOp.EQUAL; import static org.apache.kudu.client.KuduPredicate.ComparisonOp.GREATER_EQUAL; /** * Kudu client for YCSB framework. Example to load: <blockquote> * * <pre> * <code> * $ ./bin/ycsb load kudu -P workloads/workloada -threads 5 * </code> * </pre> * * </blockquote> Example to run: <blockquote> * * <pre> * <code> * ./bin/ycsb run kudu -P workloads/workloada -p kudu_sync_ops=true -threads 5 * </code> * </pre> * * </blockquote> */ public class KuduYCSBClient extends site.ycsb.DB { private static final Logger LOG = LoggerFactory.getLogger(KuduYCSBClient.class); private static final String KEY = "key"; private static final Status TIMEOUT = new Status("TIMEOUT", "The operation timed out."); private static final int MAX_TABLETS = 9000; private static final long DEFAULT_SLEEP = 60000; private static final int DEFAULT_NUM_CLIENTS = 1; private static final int DEFAULT_NUM_REPLICAS = 3; private static final String DEFAULT_PARTITION_SCHEMA = "hashPartition"; private static final String SYNC_OPS_OPT = "kudu_sync_ops"; private static final String BUFFER_NUM_OPS_OPT = "kudu_buffer_num_ops"; private static final String PRE_SPLIT_NUM_TABLETS_OPT = "kudu_pre_split_num_tablets"; private static final String TABLE_NUM_REPLICAS = "kudu_table_num_replicas"; private static final String BLOCK_SIZE_OPT = "kudu_block_size"; private static final String MASTER_ADDRESSES_OPT = "kudu_master_addresses"; private static final String NUM_CLIENTS_OPT = "kudu_num_clients"; private static final String PARTITION_SCHEMA_OPT = "kudu_partition_schema"; private static final int BLOCK_SIZE_DEFAULT = 4096; private static final int BUFFER_NUM_OPS_DEFAULT = 2000; private static final List<String> COLUMN_NAMES = new ArrayList<>(); private static List<KuduClient> clients = new ArrayList<>(); private static int clientRoundRobin = 0; private static boolean tableSetup = false; private KuduClient client; private Schema schema; private String tableName; private KuduSession session; private KuduTable kuduTable; private String partitionSchema; private int zeropadding; private boolean orderedinserts; @Override public void init() throws DBException { Properties prop = getProperties(); this.tableName = prop.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); this.partitionSchema = prop.getProperty(PARTITION_SCHEMA_OPT, DEFAULT_PARTITION_SCHEMA); this.zeropadding = Integer.parseInt(prop.getProperty(ZERO_PADDING_PROPERTY, ZERO_PADDING_PROPERTY_DEFAULT)); if (prop.getProperty(INSERT_ORDER_PROPERTY, INSERT_ORDER_PROPERTY_DEFAULT).compareTo("hashed") == 0) { this.orderedinserts = false; } else { this.orderedinserts = true; } initClient(); this.session = client.newSession(); if (getProperties().getProperty(SYNC_OPS_OPT) != null && getProperties().getProperty(SYNC_OPS_OPT).equals("false")) { this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_BACKGROUND); this.session.setMutationBufferSpace( getIntFromProp(getProperties(), BUFFER_NUM_OPS_OPT, BUFFER_NUM_OPS_DEFAULT)); } else { this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_SYNC); } try { this.kuduTable = client.openTable(tableName); this.schema = kuduTable.getSchema(); } catch (Exception e) { throw new DBException("Could not open a table because of:", e); } } /** * Initialize the 'clients' member with the configured number of * clients. */ private void initClients() throws DBException { synchronized (KuduYCSBClient.class) { if (!clients.isEmpty()) { return; } Properties prop = getProperties(); String masterAddresses = prop.getProperty(MASTER_ADDRESSES_OPT, "localhost:7051"); LOG.debug("Connecting to the masters at {}", masterAddresses); int numClients = getIntFromProp(prop, NUM_CLIENTS_OPT, DEFAULT_NUM_CLIENTS); for (int i = 0; i < numClients; i++) { clients.add(new KuduClient.KuduClientBuilder(masterAddresses) .defaultSocketReadTimeoutMs(DEFAULT_SLEEP) .defaultOperationTimeoutMs(DEFAULT_SLEEP) .defaultAdminOperationTimeoutMs(DEFAULT_SLEEP) .build()); } } } private void initClient() throws DBException { initClients(); synchronized (clients) { client = clients.get(clientRoundRobin++ % clients.size()); } setupTable(); } private void setupTable() throws DBException { Properties prop = getProperties(); synchronized (KuduYCSBClient.class) { if (tableSetup) { return; } int numTablets = getIntFromProp(prop, PRE_SPLIT_NUM_TABLETS_OPT, 4); if (numTablets > MAX_TABLETS) { throw new DBException("Specified number of tablets (" + numTablets + ") must be equal " + "or below " + MAX_TABLETS); } int numReplicas = getIntFromProp(prop, TABLE_NUM_REPLICAS, DEFAULT_NUM_REPLICAS); long recordCount = Long.parseLong(prop.getProperty(RECORD_COUNT_PROPERTY, DEFAULT_RECORD_COUNT)); if (recordCount == 0) { recordCount = Integer.MAX_VALUE; } int blockSize = getIntFromProp(prop, BLOCK_SIZE_OPT, BLOCK_SIZE_DEFAULT); int fieldCount = getIntFromProp(prop, CoreWorkload.FIELD_COUNT_PROPERTY, Integer.parseInt(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT)); final String fieldprefix = prop.getProperty(CoreWorkload.FIELD_NAME_PREFIX, CoreWorkload.FIELD_NAME_PREFIX_DEFAULT); List<ColumnSchema> columns = new ArrayList<ColumnSchema>(fieldCount + 1); ColumnSchema keyColumn = new ColumnSchema.ColumnSchemaBuilder(KEY, STRING) .key(true) .desiredBlockSize(blockSize) .build(); columns.add(keyColumn); COLUMN_NAMES.add(KEY); for (int i = 0; i < fieldCount; i++) { String name = fieldprefix + i; COLUMN_NAMES.add(name); columns.add(new ColumnSchema.ColumnSchemaBuilder(name, STRING) .desiredBlockSize(blockSize) .build()); } schema = new Schema(columns); CreateTableOptions builder = new CreateTableOptions(); if (partitionSchema.equals("hashPartition")) { builder.setRangePartitionColumns(new ArrayList<String>()); List<String> hashPartitionColumns = new ArrayList<>(); hashPartitionColumns.add(KEY); builder.addHashPartitions(hashPartitionColumns, numTablets); } else if (partitionSchema.equals("rangePartition")) { if (!orderedinserts) { // We need to use ordered keys to determine how to split range partitions. throw new DBException("Must specify `insertorder=ordered` if using rangePartition schema."); } String maxKeyValue = String.valueOf(recordCount); if (zeropadding < maxKeyValue.length()) { throw new DBException(String.format("Invalid zeropadding value: %d, zeropadding needs to be larger " + "or equal to number of digits in the record number: %d.", zeropadding, maxKeyValue.length())); } List<String> rangePartitionColumns = new ArrayList<>(); rangePartitionColumns.add(KEY); builder.setRangePartitionColumns(rangePartitionColumns); // Add rangePartitions long lowerNum = 0; long upperNum = 0; int remainder = (int) recordCount % numTablets; for (int i = 0; i < numTablets; i++) { lowerNum = upperNum; upperNum = lowerNum + recordCount / numTablets; if (i < remainder) { ++upperNum; } PartialRow lower = schema.newPartialRow(); lower.addString(KEY, CoreWorkload.buildKeyName(lowerNum, zeropadding, orderedinserts)); PartialRow upper = schema.newPartialRow(); upper.addString(KEY, CoreWorkload.buildKeyName(upperNum, zeropadding, orderedinserts)); builder.addRangePartition(lower, upper); } } else { throw new DBException("Invalid partition_schema specified: " + partitionSchema + ", must specify `partition_schema=hashPartition` or `partition_schema=rangePartition`"); } builder.setNumReplicas(numReplicas); try { client.createTable(tableName, schema, builder); } catch (Exception e) { if (!e.getMessage().contains("already exists")) { throw new DBException("Couldn't create the table", e); } } tableSetup = true; } } private static int getIntFromProp(Properties prop, String propName, int defaultValue) throws DBException { String intStr = prop.getProperty(propName); if (intStr == null) { return defaultValue; } else { try { return Integer.valueOf(intStr); } catch (NumberFormatException ex) { throw new DBException("Provided number for " + propName + " isn't a valid integer"); } } } @Override public void cleanup() throws DBException { try { this.session.close(); this.client.close(); } catch (Exception e) { throw new DBException("Couldn't cleanup the session", e); } } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Vector<HashMap<String, ByteIterator>> results = new Vector<>(); final Status status = scan(table, key, 1, fields, results); if (!status.equals(Status.OK)) { return status; } if (results.size() != 1) { return Status.NOT_FOUND; } result.putAll(results.firstElement()); return Status.OK; } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { KuduScanner.KuduScannerBuilder scannerBuilder = client.newScannerBuilder(kuduTable); List<String> querySchema; if (fields == null) { querySchema = COLUMN_NAMES; // No need to set the projected columns with the whole schema. } else { querySchema = new ArrayList<>(fields); scannerBuilder.setProjectedColumnNames(querySchema); } ColumnSchema column = schema.getColumnByIndex(0); KuduPredicate.ComparisonOp predicateOp = recordcount == 1 ? EQUAL : GREATER_EQUAL; KuduPredicate predicate = KuduPredicate.newComparisonPredicate(column, predicateOp, startkey); scannerBuilder.addPredicate(predicate); scannerBuilder.limit(recordcount); // currently noop KuduScanner scanner = scannerBuilder.build(); while (scanner.hasMoreRows()) { RowResultIterator data = scanner.nextRows(); addAllRowsToResult(data, recordcount, querySchema, result); if (recordcount == result.size()) { break; } } RowResultIterator closer = scanner.close(); addAllRowsToResult(closer, recordcount, querySchema, result); } catch (TimeoutException te) { LOG.info("Waited too long for a scan operation with start key={}", startkey); return TIMEOUT; } catch (Exception e) { LOG.warn("Unexpected exception", e); return Status.ERROR; } return Status.OK; } private void addAllRowsToResult(RowResultIterator it, int recordcount, List<String> querySchema, Vector<HashMap<String, ByteIterator>> result) throws Exception { RowResult row; HashMap<String, ByteIterator> rowResult = new HashMap<>(querySchema.size()); if (it == null) { return; } while (it.hasNext()) { if (result.size() == recordcount) { return; } row = it.next(); int colIdx = 0; for (String col : querySchema) { rowResult.put(col, new StringByteIterator(row.getString(colIdx))); colIdx++; } result.add(rowResult); } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { Update update = this.kuduTable.newUpdate(); PartialRow row = update.getRow(); row.addString(KEY, key); for (int i = 1; i < schema.getColumnCount(); i++) { String columnName = schema.getColumnByIndex(i).getName(); ByteIterator b = values.get(columnName); if (b != null) { row.addStringUtf8(columnName, b.toArray()); } } apply(update); return Status.OK; } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { Insert insert = this.kuduTable.newInsert(); PartialRow row = insert.getRow(); row.addString(KEY, key); for (int i = 1; i < schema.getColumnCount(); i++) { row.addStringUtf8(i, values.get(schema.getColumnByIndex(i).getName()).toArray()); } apply(insert); return Status.OK; } @Override public Status delete(String table, String key) { Delete delete = this.kuduTable.newDelete(); PartialRow row = delete.getRow(); row.addString(KEY, key); apply(delete); return Status.OK; } private void apply(Operation op) { try { OperationResponse response = session.apply(op); if (response != null && response.hasRowError()) { LOG.info("Write operation failed: {}", response.getRowError()); } } catch (KuduException ex) { LOG.warn("Write operation failed", ex); } } }
15,870
36.698337
112
java
null
NearPMSW-main/baseline/logging/YCSB2/tablestore/src/main/java/site/ycsb/db/tablestore/package-info.java
/* * Copyright 2018 YCSB Contributors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://www.alibabacloud.com/product/table-store">TableStore</a>. */ package site.ycsb.db.tablestore;
795
33.608696
98
java
null
NearPMSW-main/baseline/logging/YCSB2/tablestore/src/main/java/site/ycsb/db/tablestore/TableStoreClient.java
/* * Copyright 2018 YCSB Contributors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.tablestore; import java.util.*; import java.util.function.*; import site.ycsb.*; import com.alicloud.openservices.tablestore.*; import com.alicloud.openservices.tablestore.model.*; import org.apache.log4j.Logger; /** * TableStore Client for YCSB. */ public class TableStoreClient extends DB { private static SyncClient client; private int maxVersions = 1; private String primaryKeyName; private static final Logger LOGGER = Logger.getLogger(TableStoreClient.class); // nasty here as currently there is no support of JEP218 private void setIntegerProperty( Properties properties, String propertyName, ClientConfiguration clientConfiguration, Function<Integer, Boolean> qualifyFunction, BiConsumer<ClientConfiguration, Integer> setFunction) throws DBException { String propertyString = properties.getProperty(propertyName); if (propertyString != null) { Integer propertyInteger = new Integer(propertyString); if (qualifyFunction.apply(propertyInteger).booleanValue()) { setFunction.accept(clientConfiguration, propertyInteger); } else { String errorMessage = "Illegal argument." + propertyName + ":" + propertyString; LOGGER.error(errorMessage); throw new DBException(errorMessage); } } } @Override public void init() throws DBException { Properties properties = getProperties(); String accessID = properties.getProperty("alibaba.cloud.tablestore.access_id"); String accessKey = properties.getProperty("alibaba.cloud.tablestore.access_key"); String endPoint = properties.getProperty("alibaba.cloud.tablestore.end_point"); String instanceName = properties.getProperty("alibaba.cloud.tablestore.instance_name"); String maxVersion = properties.getProperty("alibaba.cloud.tablestore.max_version", "1"); maxVersions = Integer.parseInt(maxVersion); primaryKeyName = properties.getProperty("alibaba.cloud.tablestore.primary_key", ""); ClientConfiguration clientConfiguration = new ClientConfiguration(); setIntegerProperty( properties, "alibaba.cloud.tablestore.connection_timeout", clientConfiguration, (Integer t) -> t > 0, (ClientConfiguration c, Integer t) -> c.setConnectionTimeoutInMillisecond(t.intValue())); setIntegerProperty( properties, "alibaba.cloud.tablestore.socket_timeout", clientConfiguration, (Integer t) -> t > 0, (ClientConfiguration c, Integer t) -> c.setSocketTimeoutInMillisecond(t.intValue())); setIntegerProperty( properties, "alibaba.cloud.tablestore.max_connections", clientConfiguration, (Integer t) -> t > 0, (ClientConfiguration c, Integer t) -> c.setMaxConnections(t.intValue())); try { synchronized (TableStoreClient.class) { if (client == null) { client = new SyncClient(endPoint, accessID, accessKey, instanceName, clientConfiguration); LOGGER.info("new tablestore sync client\tendpoint:" + endPoint + "\tinstanceName:" + instanceName); } } } catch (IllegalArgumentException e) { throw new DBException("Illegal argument passed in. Check the format of your parameters.", e); } } private void setResult(Set<String> fields, Map<String, ByteIterator> result, Row row) { if (row != null) { if (fields != null) { for (String field : fields) { result.put(field, new StringByteIterator((row.getColumn(field).toString()))); } } else { for (Column column : row.getColumns()) { result.put(column.getName(), new StringByteIterator(column.getValue().asString())); } } } } private Status dealWithTableStoreException(TableStoreException e) { if (e.getErrorCode().contains("OTSRowOperationConflict")) { return Status.ERROR; } LOGGER.error(e); return Status.ERROR; } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { // set primary key PrimaryKeyColumn[] primaryKeyColumns = new PrimaryKeyColumn[1]; primaryKeyColumns[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.fromString(key)); PrimaryKey primaryKey = new PrimaryKey(primaryKeyColumns); // set table_name SingleRowQueryCriteria singleRowQueryCriteria = new SingleRowQueryCriteria(table, primaryKey); singleRowQueryCriteria.setMaxVersions(maxVersions); // set columns if (fields != null) { singleRowQueryCriteria.addColumnsToGet(fields.toArray(new String[0])); } // set get_row request GetRowRequest getRowRequest = new GetRowRequest(); getRowRequest.setRowQueryCriteria(singleRowQueryCriteria); // operate GetRowResponse getRowResponse = client.getRow(getRowRequest); // set the result setResult(fields, result, getRowResponse.getRow()); return Status.OK; } catch (TableStoreException e) { return dealWithTableStoreException(e); } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { // set primary key PrimaryKeyColumn[] startKey = new PrimaryKeyColumn[1]; startKey[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.fromString(startkey)); PrimaryKeyColumn[] endKey = new PrimaryKeyColumn[1]; endKey[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.INF_MAX); RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(table); criteria.setInclusiveStartPrimaryKey(new PrimaryKey(startKey)); criteria.setExclusiveEndPrimaryKey(new PrimaryKey(endKey)); criteria.setMaxVersions(maxVersions); // set columns if (fields != null) { criteria.addColumnsToGet(fields.toArray(new String[0])); } // set limit criteria.setLimit(recordcount); // set the request GetRangeRequest getRangeRequest = new GetRangeRequest(); getRangeRequest.setRangeRowQueryCriteria(criteria); GetRangeResponse getRangeResponse = client.getRange(getRangeRequest); // set the result List<Row> rows = getRangeResponse.getRows(); for (Row row : rows) { HashMap<String, ByteIterator> values = new HashMap<>(); setResult(fields, values, row); result.add(values); } return Status.OK; } catch (TableStoreException e) { return dealWithTableStoreException(e); } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { PrimaryKeyColumn[] primaryKeyColumns = new PrimaryKeyColumn[1]; primaryKeyColumns[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.fromString(key)); PrimaryKey primaryKey = new PrimaryKey(primaryKeyColumns); RowUpdateChange rowUpdateChange = new RowUpdateChange(table, primaryKey); for (Map.Entry<String, ByteIterator> entry: values.entrySet()) { rowUpdateChange.put(entry.getKey(), ColumnValue.fromString(entry.getValue().toString())); } UpdateRowRequest updateRowRequest = new UpdateRowRequest(); updateRowRequest.setRowChange(rowUpdateChange); client.updateRow(updateRowRequest); return Status.OK; } catch (TableStoreException e) { return dealWithTableStoreException(e); } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { // set the primary key PrimaryKeyColumn[] primaryKeyColumns = new PrimaryKeyColumn[1]; primaryKeyColumns[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.fromString(key)); PrimaryKey primaryKey = new PrimaryKey(primaryKeyColumns); RowPutChange rowPutChange = new RowPutChange(table, primaryKey); // set the columns for (Map.Entry<String, ByteIterator> entry: values.entrySet()) { rowPutChange.addColumn(entry.getKey(), ColumnValue.fromString(entry.getValue().toString())); } // set the putRow request PutRowRequest putRowRequest = new PutRowRequest(); putRowRequest.setRowChange(rowPutChange); // operate client.putRow(putRowRequest); return Status.OK; } catch (TableStoreException e) { return dealWithTableStoreException(e); } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status delete(String table, String key) { try { PrimaryKeyColumn[] primaryKeyColumns = new PrimaryKeyColumn[1]; primaryKeyColumns[0] = new PrimaryKeyColumn(primaryKeyName, PrimaryKeyValue.fromString(key)); PrimaryKey primaryKey = new PrimaryKey(primaryKeyColumns); RowDeleteChange rowDeleteChange = new RowDeleteChange(table, primaryKey); DeleteRowRequest deleteRowRequest = new DeleteRowRequest(); deleteRowRequest.setRowChange(rowDeleteChange); client.deleteRow(deleteRowRequest); return Status.OK; } catch (TableStoreException e) { return dealWithTableStoreException(e); } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } }
10,214
36.01087
109
java
null
NearPMSW-main/baseline/logging/YCSB2/aerospike/src/main/java/site/ycsb/db/package-info.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>. */ package site.ycsb.db;
760
33.590909
70
java
null
NearPMSW-main/baseline/logging/YCSB2/aerospike/src/main/java/site/ycsb/db/AerospikeClient.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import com.aerospike.client.AerospikeException; import com.aerospike.client.Bin; import com.aerospike.client.Key; import com.aerospike.client.Record; import com.aerospike.client.policy.ClientPolicy; import com.aerospike.client.policy.Policy; import com.aerospike.client.policy.RecordExistsAction; import com.aerospike.client.policy.WritePolicy; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Vector; /** * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>. */ public class AerospikeClient extends site.ycsb.DB { private static final String DEFAULT_HOST = "localhost"; private static final String DEFAULT_PORT = "3000"; private static final String DEFAULT_TIMEOUT = "10000"; private static final String DEFAULT_NAMESPACE = "ycsb"; private String namespace = null; private com.aerospike.client.AerospikeClient client = null; private Policy readPolicy = new Policy(); private WritePolicy insertPolicy = new WritePolicy(); private WritePolicy updatePolicy = new WritePolicy(); private WritePolicy deletePolicy = new WritePolicy(); @Override public void init() throws DBException { insertPolicy.recordExistsAction = RecordExistsAction.CREATE_ONLY; updatePolicy.recordExistsAction = RecordExistsAction.REPLACE_ONLY; Properties props = getProperties(); namespace = props.getProperty("as.namespace", DEFAULT_NAMESPACE); String host = props.getProperty("as.host", DEFAULT_HOST); String user = props.getProperty("as.user"); String password = props.getProperty("as.password"); int port = Integer.parseInt(props.getProperty("as.port", DEFAULT_PORT)); int timeout = Integer.parseInt(props.getProperty("as.timeout", DEFAULT_TIMEOUT)); readPolicy.timeout = timeout; insertPolicy.timeout = timeout; updatePolicy.timeout = timeout; deletePolicy.timeout = timeout; ClientPolicy clientPolicy = new ClientPolicy(); if (user != null && password != null) { clientPolicy.user = user; clientPolicy.password = password; } try { client = new com.aerospike.client.AerospikeClient(clientPolicy, host, port); } catch (AerospikeException e) { throw new DBException(String.format("Error while creating Aerospike " + "client for %s:%d.", host, port), e); } } @Override public void cleanup() throws DBException { client.close(); } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { Record record; if (fields != null) { record = client.get(readPolicy, new Key(namespace, table, key), fields.toArray(new String[fields.size()])); } else { record = client.get(readPolicy, new Key(namespace, table, key)); } if (record == null) { System.err.println("Record key " + key + " not found (read)"); return Status.ERROR; } for (Map.Entry<String, Object> entry: record.bins.entrySet()) { result.put(entry.getKey(), new ByteArrayByteIterator((byte[])entry.getValue())); } return Status.OK; } catch (AerospikeException e) { System.err.println("Error while reading key " + key + ": " + e); return Status.ERROR; } } @Override public Status scan(String table, String start, int count, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { System.err.println("Scan not implemented"); return Status.ERROR; } private Status write(String table, String key, WritePolicy writePolicy, Map<String, ByteIterator> values) { Bin[] bins = new Bin[values.size()]; int index = 0; for (Map.Entry<String, ByteIterator> entry: values.entrySet()) { bins[index] = new Bin(entry.getKey(), entry.getValue().toArray()); ++index; } Key keyObj = new Key(namespace, table, key); try { client.put(writePolicy, keyObj, bins); return Status.OK; } catch (AerospikeException e) { System.err.println("Error while writing key " + key + ": " + e); return Status.ERROR; } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { return write(table, key, updatePolicy, values); } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { return write(table, key, insertPolicy, values); } @Override public Status delete(String table, String key) { try { if (!client.delete(deletePolicy, new Key(namespace, table, key))) { System.err.println("Record key " + key + " not found (delete)"); return Status.ERROR; } return Status.OK; } catch (AerospikeException e) { System.err.println("Error while deleting key " + key + ": " + e); return Status.ERROR; } } }
5,790
30.472826
79
java
null
NearPMSW-main/baseline/logging/YCSB2/azurecosmos/src/main/java/site/ycsb/db/package-info.java
/* * Copyright 2018 YCSB Contributors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://azure.microsoft.com/services/cosmos-db/">Azure Cosmos</a>. */ package site.ycsb.db;
785
33.173913
99
java
null
NearPMSW-main/baseline/logging/YCSB2/azurecosmos/src/main/java/site/ycsb/db/AzureCosmosClient.java
/* * Copyright (c) 2018 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. */ package site.ycsb.db; import java.time.Duration; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosContainer; import com.azure.cosmos.CosmosDatabase; import com.azure.cosmos.CosmosException; import com.azure.cosmos.DirectConnectionConfig; import com.azure.cosmos.GatewayConnectionConfig; import com.azure.cosmos.ThrottlingRetryOptions; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; import com.azure.cosmos.util.CosmosPagedIterable; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; /** * Azure Cosmos DB Java SDK 4.6.0 client for YCSB. */ public class AzureCosmosClient extends DB { protected static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); // Default configuration values private static final ConsistencyLevel DEFAULT_CONSISTENCY_LEVEL = ConsistencyLevel.SESSION; private static final String DEFAULT_DATABASE_NAME = "ycsb"; private static final boolean DEFAULT_USE_GATEWAY = false; private static final boolean DEFAULT_USE_UPSERT = false; private static final int DEFAULT_MAX_DEGREE_OF_PARALLELISM = -1; private static final int DEFAULT_MAX_BUFFERED_ITEM_COUNT = 0; private static final int DEFAULT_PREFERRED_PAGE_SIZE = -1; public static final int NUM_UPDATE_ATTEMPTS = 4; private static final boolean DEFAULT_INCLUDE_EXCEPTION_STACK_IN_LOG = false; private static final String DEFAULT_USER_AGENT = "azurecosmos-ycsb"; private static final Logger LOGGER = LoggerFactory.getLogger(AzureCosmosClient.class); /** * Count the number of times initialized to teardown on the last * {@link #cleanup()}. */ private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); private static CosmosClient client; private static CosmosDatabase database; private static String databaseName; private static boolean useUpsert; private static int maxDegreeOfParallelism; private static int maxBufferedItemCount; private static int preferredPageSize; private static boolean includeExceptionStackInLog; private static Map<String, CosmosContainer> containerCache; private static String userAgent; @Override public void init() throws DBException { INIT_COUNT.incrementAndGet(); synchronized (INIT_COUNT) { if (client != null) { return; } try { initAzureCosmosClient(); } catch (Exception e) { throw new DBException(e); } } } private void initAzureCosmosClient() throws DBException { // Connection properties String primaryKey = this.getStringProperty("azurecosmos.primaryKey", null); if (primaryKey == null || primaryKey.isEmpty()) { throw new DBException("Missing primary key required to connect to the database."); } String uri = this.getStringProperty("azurecosmos.uri", null); if (primaryKey == null || primaryKey.isEmpty()) { throw new DBException("Missing uri required to connect to the database."); } AzureCosmosClient.userAgent = this.getStringProperty("azurecosmos.userAgent", DEFAULT_USER_AGENT); AzureCosmosClient.useUpsert = this.getBooleanProperty("azurecosmos.useUpsert", DEFAULT_USE_UPSERT); AzureCosmosClient.databaseName = this.getStringProperty("azurecosmos.databaseName", DEFAULT_DATABASE_NAME); AzureCosmosClient.maxDegreeOfParallelism = this.getIntProperty("azurecosmos.maxDegreeOfParallelism", DEFAULT_MAX_DEGREE_OF_PARALLELISM); AzureCosmosClient.maxBufferedItemCount = this.getIntProperty("azurecosmos.maxBufferedItemCount", DEFAULT_MAX_BUFFERED_ITEM_COUNT); AzureCosmosClient.preferredPageSize = this.getIntProperty("azurecosmos.preferredPageSize", DEFAULT_PREFERRED_PAGE_SIZE); AzureCosmosClient.includeExceptionStackInLog = this.getBooleanProperty("azurecosmos.includeExceptionStackInLog", DEFAULT_INCLUDE_EXCEPTION_STACK_IN_LOG); ConsistencyLevel consistencyLevel = ConsistencyLevel.valueOf( this.getStringProperty("azurecosmos.consistencyLevel", DEFAULT_CONSISTENCY_LEVEL.toString().toUpperCase())); boolean useGateway = this.getBooleanProperty("azurecosmos.useGateway", DEFAULT_USE_GATEWAY); ThrottlingRetryOptions retryOptions = new ThrottlingRetryOptions(); int maxRetryAttemptsOnThrottledRequests = this.getIntProperty("azurecosmos.maxRetryAttemptsOnThrottledRequests", -1); if (maxRetryAttemptsOnThrottledRequests != -1) { retryOptions.setMaxRetryAttemptsOnThrottledRequests(maxRetryAttemptsOnThrottledRequests); } // Direct connection config options. DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig(); int directMaxConnectionsPerEndpoint = this.getIntProperty("azurecosmos.directMaxConnectionsPerEndpoint", -1); if (directMaxConnectionsPerEndpoint != -1) { directConnectionConfig.setMaxConnectionsPerEndpoint(directMaxConnectionsPerEndpoint); } int directIdleConnectionTimeoutInSeconds = this.getIntProperty("azurecosmos.directIdleConnectionTimeoutInSeconds", -1); if (directIdleConnectionTimeoutInSeconds != -1) { directConnectionConfig.setIdleConnectionTimeout(Duration.ofSeconds(directIdleConnectionTimeoutInSeconds)); } // Gateway connection config options. GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); int gatewayMaxConnectionPoolSize = this.getIntProperty("azurecosmos.gatewayMaxConnectionPoolSize", -1); if (gatewayMaxConnectionPoolSize != -1) { gatewayConnectionConfig.setMaxConnectionPoolSize(gatewayMaxConnectionPoolSize); } int gatewayIdleConnectionTimeoutInSeconds = this.getIntProperty("azurecosmos.gatewayIdleConnectionTimeoutInSeconds", -1); if (gatewayIdleConnectionTimeoutInSeconds != -1) { gatewayConnectionConfig.setIdleConnectionTimeout(Duration.ofSeconds(gatewayIdleConnectionTimeoutInSeconds)); } try { LOGGER.info( "Creating Cosmos DB client {}, useGateway={}, consistencyLevel={}," + " maxRetryAttemptsOnThrottledRequests={}, maxRetryWaitTimeInSeconds={}" + " useUpsert={}, maxDegreeOfParallelism={}, maxBufferedItemCount={}, preferredPageSize={}", uri, useGateway, consistencyLevel.toString(), retryOptions.getMaxRetryAttemptsOnThrottledRequests(), retryOptions.getMaxRetryWaitTime().toMillis() / 1000, AzureCosmosClient.useUpsert, AzureCosmosClient.maxDegreeOfParallelism, AzureCosmosClient.maxBufferedItemCount, AzureCosmosClient.preferredPageSize); CosmosClientBuilder builder = new CosmosClientBuilder().endpoint(uri).key(primaryKey) .throttlingRetryOptions(retryOptions).consistencyLevel(consistencyLevel).userAgentSuffix(userAgent); if (useGateway) { builder = builder.gatewayMode(gatewayConnectionConfig); } else { builder = builder.directMode(directConnectionConfig); } AzureCosmosClient.client = builder.buildClient(); LOGGER.info("Azure Cosmos DB connection created to {}", uri); } catch (IllegalArgumentException e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } throw new DBException("Illegal argument passed in. Check the format of your parameters.", e); } AzureCosmosClient.containerCache = new ConcurrentHashMap<>(); // Verify the database exists try { AzureCosmosClient.database = AzureCosmosClient.client.getDatabase(databaseName); AzureCosmosClient.database.read(); } catch (CosmosException e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } throw new DBException( "Invalid database name (" + AzureCosmosClient.databaseName + ") or failed to read database.", e); } } private String getStringProperty(String propertyName, String defaultValue) { return getProperties().getProperty(propertyName, defaultValue); } private boolean getBooleanProperty(String propertyName, boolean defaultValue) { String stringVal = getProperties().getProperty(propertyName, null); if (stringVal == null) { return defaultValue; } return Boolean.parseBoolean(stringVal); } private int getIntProperty(String propertyName, int defaultValue) { String stringVal = getProperties().getProperty(propertyName, null); if (stringVal == null) { return defaultValue; } try { return Integer.parseInt(stringVal); } catch (NumberFormatException e) { return defaultValue; } } /** * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ @Override public void cleanup() throws DBException { synchronized (INIT_COUNT) { if (INIT_COUNT.decrementAndGet() <= 0 && AzureCosmosClient.client != null) { try { AzureCosmosClient.client.close(); } catch (Exception e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } LOGGER.error("Could not close DocumentClient", e); } finally { AzureCosmosClient.client = null; } } } } /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table The name of the table * @param key The record key of the record to read. * @param fields The list of fields to read, or null for all of them * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { CosmosContainer container = AzureCosmosClient.containerCache.get(table); if (container == null) { container = AzureCosmosClient.database.getContainer(table); AzureCosmosClient.containerCache.put(table, container); } CosmosItemResponse<ObjectNode> response = container.readItem(key, new PartitionKey(key), ObjectNode.class); ObjectNode node = response.getItem(); Map<String, String> stringResults = new HashMap<>(node.size()); if (fields == null) { Iterator<Map.Entry<String, JsonNode>> iter = node.fields(); while (iter.hasNext()) { Entry<String, JsonNode> pair = iter.next(); stringResults.put(pair.getKey().toString(), pair.getValue().toString()); } StringByteIterator.putAllAsByteIterators(result, stringResults); } else { Iterator<Map.Entry<String, JsonNode>> iter = node.fields(); while (iter.hasNext()) { Entry<String, JsonNode> pair = iter.next(); if (fields.contains(pair.getKey())) { stringResults.put(pair.getKey().toString(), pair.getValue().toString()); } } StringByteIterator.putAllAsByteIterators(result, stringResults); } return Status.OK; } catch (CosmosException e) { LOGGER.error("Failed to read key {} in collection {} in database {}", key, table, AzureCosmosClient.databaseName, e); return Status.NOT_FOUND; } } /** * Perform a range scan for a set of records in the database. Each field/value * pair from the result will be stored in a HashMap. * * * @param table The name of the table * @param startkey The record key of the first record to read. * @param recordcount The number of records to read * @param fields The list of fields to read, or null for all of them * @param result A Vector of HashMaps, where each HashMap is a set * field/value pairs for one record * @return Zero on success, a non-zero error code on error */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions(); queryOptions.setMaxDegreeOfParallelism(AzureCosmosClient.maxDegreeOfParallelism); queryOptions.setMaxBufferedItemCount(AzureCosmosClient.maxBufferedItemCount); CosmosContainer container = AzureCosmosClient.containerCache.get(table); if (container == null) { container = AzureCosmosClient.database.getContainer(table); AzureCosmosClient.containerCache.put(table, container); } List<SqlParameter> paramList = new ArrayList<>(); paramList.add(new SqlParameter("@startkey", startkey)); SqlQuerySpec querySpec = new SqlQuerySpec( this.createSelectTop(fields, recordcount) + " FROM root r WHERE r.id >= @startkey", paramList); CosmosPagedIterable<ObjectNode> pagedIterable = container.queryItems(querySpec, queryOptions, ObjectNode.class); Iterator<FeedResponse<ObjectNode>> pageIterator = pagedIterable .iterableByPage(AzureCosmosClient.preferredPageSize).iterator(); while (pageIterator.hasNext()) { List<ObjectNode> pageDocs = pageIterator.next().getResults(); for (ObjectNode doc : pageDocs) { Map<String, String> stringResults = new HashMap<>(doc.size()); Iterator<Map.Entry<String, JsonNode>> nodeIterator = doc.fields(); while (nodeIterator.hasNext()) { Entry<String, JsonNode> pair = nodeIterator.next(); stringResults.put(pair.getKey().toString(), pair.getValue().toString()); } HashMap<String, ByteIterator> byteResults = new HashMap<>(doc.size()); StringByteIterator.putAllAsByteIterators(byteResults, stringResults); result.add(byteResults); } } return Status.OK; } catch (CosmosException e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } LOGGER.error("Failed to query key {} from collection {} in database {}", startkey, table, AzureCosmosClient.databaseName, e); } return Status.ERROR; } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record key, * overwriting any existing values with the same field name. * * @param table The name of the table * @param key The record key of the record to write. * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { String readEtag = ""; // Azure Cosmos DB does not have patch support. Until then, we need to read // the document, update it, and then write it back. // This could be made more efficient by using a stored procedure // and doing the read/modify write on the server side. Perhaps // that will be a future improvement. for (int attempt = 0; attempt < NUM_UPDATE_ATTEMPTS; attempt++) { try { CosmosContainer container = AzureCosmosClient.containerCache.get(table); if (container == null) { container = AzureCosmosClient.database.getContainer(table); AzureCosmosClient.containerCache.put(table, container); } CosmosItemResponse<ObjectNode> response = container.readItem(key, new PartitionKey(key), ObjectNode.class); readEtag = response.getETag(); ObjectNode node = response.getItem(); for (Entry<String, ByteIterator> pair : values.entrySet()) { node.put(pair.getKey(), pair.getValue().toString()); } CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); requestOptions.setIfMatchETag(readEtag); PartitionKey pk = new PartitionKey(key); container.replaceItem(node, key, pk, requestOptions); return Status.OK; } catch (CosmosException e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } LOGGER.error("Failed to update key {} to collection {} in database {} on attempt {}", key, table, AzureCosmosClient.databaseName, attempt, e); } } return Status.ERROR; } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record key. * * @param table The name of the table * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Insert key: {} into table: {}", key, table); } try { CosmosContainer container = AzureCosmosClient.containerCache.get(table); if (container == null) { container = AzureCosmosClient.database.getContainer(table); AzureCosmosClient.containerCache.put(table, container); } PartitionKey pk = new PartitionKey(key); ObjectNode node = OBJECT_MAPPER.createObjectNode(); node.put("id", key); for (Map.Entry<String, ByteIterator> pair : values.entrySet()) { node.put(pair.getKey(), pair.getValue().toString()); } if (AzureCosmosClient.useUpsert) { container.upsertItem(node, pk, new CosmosItemRequestOptions()); } else { container.createItem(node, pk, new CosmosItemRequestOptions()); } return Status.OK; } catch (CosmosException e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } LOGGER.error("Failed to insert key {} to collection {} in database {}", key, table, AzureCosmosClient.databaseName, e); } return Status.ERROR; } @Override public Status delete(String table, String key) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Delete key {} from table {}", key, table); } try { CosmosContainer container = AzureCosmosClient.containerCache.get(table); if (container == null) { container = AzureCosmosClient.database.getContainer(table); AzureCosmosClient.containerCache.put(table, container); } container.deleteItem(key, new PartitionKey(key), new CosmosItemRequestOptions()); return Status.OK; } catch (Exception e) { if (!AzureCosmosClient.includeExceptionStackInLog) { e = null; } LOGGER.error("Failed to delete key {} in collection {}", key, table, e); } return Status.ERROR; } private String createSelectTop(Set<String> fields, int top) { if (fields == null) { return "SELECT TOP " + top + " * "; } else { StringBuilder result = new StringBuilder("SELECT TOP ").append(top).append(" "); int initLength = result.length(); for (String field : fields) { if (result.length() != initLength) { result.append(", "); } result.append("r['").append(field).append("'] "); } return result.toString(); } } }
20,780
39.117761
120
java
null
NearPMSW-main/baseline/logging/YCSB2/maprdb/src/main/java/site/ycsb/db/mapr/package-info.java
/* * Copyright (c) 2017, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://mapr.com/maprdb/">MapR-DB</a>. */ package site.ycsb.db.mapr;
760
32.086957
70
java
null
NearPMSW-main/baseline/logging/YCSB2/maprdb/src/main/java/site/ycsb/db/mapr/MapRDBClient.java
/** * Copyright (c) 2017 Yahoo! Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.mapr; /** * MapR-DB(binary) client for YCSB framework. * */ public class MapRDBClient extends site.ycsb.db.hbase1.HBaseClient1 { }
809
30.153846
70
java
null
NearPMSW-main/baseline/logging/YCSB2/griddb/src/test/java/site/ycsb/db/griddb/GridDBClientTest.java
/** * Copyright (c) 2018 TOSHIBA Digital Solutions Corporation. * Copyright (c) 2018 YCSB contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.griddb; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.*; import static org.junit.Assume.assumeNoException; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import com.toshiba.mwcloud.gs.ColumnInfo; import com.toshiba.mwcloud.gs.ContainerInfo; import com.toshiba.mwcloud.gs.ContainerType; import com.toshiba.mwcloud.gs.GSException; import com.toshiba.mwcloud.gs.GSType; import com.toshiba.mwcloud.gs.GridStore; import com.toshiba.mwcloud.gs.GridStoreFactory; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.measurements.Measurements; import site.ycsb.workloads.CoreWorkload; public class GridDBClientTest { // Default GridbDB port private static final int GRIDDB_DEFAULT_PORT = 10040; //GridDBDatastore configuration private final static String TEST_TABLE = "testtable"; private final static String NOTIFICATION_PORT = "31999";//default is 31999 private final static String NOTIFICATION_ADDR = "239.0.0.1";//default is 239.0.0.1 private final static String CLUSTER_NAME = "ycsbcluster";//Fill your cluster name private final static String USER_NAME = "admin";//Fill your user name private final static String PASS = "admin";//Fill your password private final static int FIELD_COUNT = 10; private final static String FIELD_LENGTH = "100"; private DB myClient = null; private final static String DEFAULT_ROW_KEY = "user1"; public static final String VALUE_COLUMN_NAME_PREFIX= "field"; private ContainerInfo containerInfo = null; private GridStore store; /** * Verifies the GridDB process (or some process) is running on port 10040, if * not the tests are skipped. */ @BeforeClass public static void setUpBeforeClass() { // Test if we can connect. Socket socket = null; try { // Connect socket = new Socket(InetAddress.getLocalHost(), GRIDDB_DEFAULT_PORT); assertThat("Socket is not bound.", socket.getLocalPort(), not(-1)); } catch (IOException connectFailed) { assumeNoException("GridDB is not running. Skipping tests.", connectFailed); } finally { if (socket != null) { try { socket.close(); } catch (IOException ignore) { // Ignore. } } socket = null; } } /** * Create properties for configuration to get client * Create data table to test */ @Before public void setUp() throws Exception { Properties p = new Properties(); p.setProperty("notificationAddress", NOTIFICATION_ADDR); p.setProperty("notificationPort", NOTIFICATION_PORT); p.setProperty("clusterName", CLUSTER_NAME); p.setProperty("userName", USER_NAME); p.setProperty("user", USER_NAME); p.setProperty("password", PASS); p.setProperty("fieldcount", String.valueOf(FIELD_COUNT)); p.setProperty("fieldlength", FIELD_LENGTH); Measurements.setProperties(p); final CoreWorkload workload = new CoreWorkload(); workload.init(p); getDB(p); // Create data table to test // List of columns List<ColumnInfo> columnInfoList = new ArrayList<ColumnInfo>(); ColumnInfo keyInfo = new ColumnInfo("key", GSType.STRING); columnInfoList.add(keyInfo); for (int i = 0; i < FIELD_COUNT; i++) { String columnName = String.format(VALUE_COLUMN_NAME_PREFIX + "%d", i); ColumnInfo info = new ColumnInfo(columnName, GSType.STRING); columnInfoList.add(info); } containerInfo = new ContainerInfo(null, ContainerType.COLLECTION, columnInfoList, true); try { GridStoreFactory.getInstance().setProperties(p); store = GridStoreFactory.getInstance().getGridStore(p); store.putContainer(TEST_TABLE, containerInfo, false); } catch (GSException e) { e.printStackTrace(); throw new DBException(); } } /** * Insert data to GridbDB database for testing */ private void insertToDatabase() { HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); // The number of field in container info is 10 for (int i = 0; i < FIELD_COUNT; i++) { values.put(VALUE_COLUMN_NAME_PREFIX + i, new StringByteIterator("value" + i)); } myClient.insert(TEST_TABLE, DEFAULT_ROW_KEY, values); } @Test public void testReadNoExistedRow() { Set<String> fields = Collections.singleton("field0"); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); insertToDatabase(); Status readStatus = myClient.read(TEST_TABLE, "Missing row", fields, result); assertEquals(readStatus, Status.ERROR); assertEquals(result.size(), 0); } @Test public void testReadSingleRow() { Set<String> fields = Collections.singleton("field1"); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); insertToDatabase(); Status readStatus = myClient.read(TEST_TABLE, DEFAULT_ROW_KEY, fields, result); assertEquals(readStatus, Status.OK); assertNotEquals(result.entrySet(), 0); for (String key : fields) { ByteIterator iter = result.get(key); byte[] byteArray1 = iter.toArray(); String value = new String(byteArray1); assertEquals(value, "value1"); } } @Test public void testReadAll() { HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); insertToDatabase(); Status readStatus = myClient.read(TEST_TABLE, DEFAULT_ROW_KEY, null, result); assertEquals(readStatus, Status.OK); assertEquals(result.size(), FIELD_COUNT); for (int i = 0; i < FIELD_COUNT; i++) { ByteIterator iter = result.get("field" + i); byte[] byteArray1 = iter.toArray(); String value = new String(byteArray1); assertEquals(value, "value" + i); } } @Test public void testUpdate() { HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); insertToDatabase(); String keyForUpdate = "field2"; Set<String> fields = Collections.singleton(keyForUpdate); String strValueToUpdate = "new_value_2"; ByteIterator valForUpdate = new StringByteIterator(strValueToUpdate); values.put(keyForUpdate, valForUpdate); Status updateStatus = myClient.update(TEST_TABLE, DEFAULT_ROW_KEY, values); assertEquals(updateStatus, Status.OK); // After update, we read the update row for get new value myClient.read(TEST_TABLE, DEFAULT_ROW_KEY, fields, result); assertNotEquals(result.entrySet(), 0); boolean found = false; for (int i = 0; i < FIELD_COUNT; i++) { ByteIterator iter = result.get("field" + i); byte[] byteArray1 = iter.toArray(); String value = new String(byteArray1); // check result has row value is new update value or not if (value.equals(strValueToUpdate)) { found = true; } } assertEquals(found, true); } @Test public void testInsert() { HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); // The number of field in container info is 10 for (int i = 0; i < FIELD_COUNT; i++) { values.put("field" + i, new StringByteIterator("value" + i)); } Status insertStatus = myClient.insert(TEST_TABLE, DEFAULT_ROW_KEY, values); assertEquals(insertStatus, Status.OK); myClient.read(TEST_TABLE, DEFAULT_ROW_KEY, null, result); assertEquals(result.size(), FIELD_COUNT); for (int i = 0; i < FIELD_COUNT; i++) { ByteIterator iter = result.get("field" + i); byte[] byteArray1 = iter.toArray(); String value = new String(byteArray1); assertEquals(value, "value" + i); } } @Test public void testDelete() { HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); insertToDatabase(); Status deleteStatus = myClient.delete(TEST_TABLE, DEFAULT_ROW_KEY); assertEquals(deleteStatus, Status.OK); Status readStatus = myClient.read(TEST_TABLE, DEFAULT_ROW_KEY, null, result); assertEquals(readStatus, Status.ERROR); assertEquals(result.size(), 0); } @Test public void testCombination() { final int LOOP_COUNT = 3; for (int i = 0; i < LOOP_COUNT; i++) { testReadNoExistedRow(); testReadSingleRow(); testReadAll(); testInsert(); testUpdate(); testDelete(); } } /** * Stops the test client. */ @After public void tearDown() { try { myClient.cleanup(); store.dropContainer(TEST_TABLE); } catch (Exception error) { // Ignore. } finally { myClient = null; } } /** * Gets the test DB. * * @param props * Properties to pass to the client. * @return The test DB. */ protected DB getDB(Properties props) { if( myClient == null ) { myClient = new GridDBClient(); myClient.setProperties(props); try { myClient.init(); } catch (Exception error) { assumeNoException(error); } } return myClient; } }
11,184
32.791541
96
java
null
NearPMSW-main/baseline/logging/YCSB2/griddb/src/main/java/site/ycsb/db/griddb/package-info.java
/* * Copyright (c) 2018 TOSHIBA Digital Solutions Corporation. * Copyright (c) 2018 YCSB contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://griddb.net/">GridDB</a>. */ package site.ycsb.db.griddb;
801
33.869565
70
java
null
NearPMSW-main/baseline/logging/YCSB2/griddb/src/main/java/site/ycsb/db/griddb/GridDBClient.java
/** * Copyright (c) 2018 TOSHIBA Digital Solutions Corporation. * Copyright (c) 2018 YCSB contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.griddb; import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.Vector; import java.util.logging.Logger; import com.toshiba.mwcloud.gs.ColumnInfo; import com.toshiba.mwcloud.gs.Container; import com.toshiba.mwcloud.gs.ContainerInfo; import com.toshiba.mwcloud.gs.ContainerType; import com.toshiba.mwcloud.gs.GSException; import com.toshiba.mwcloud.gs.GSType; import com.toshiba.mwcloud.gs.GridStore; import com.toshiba.mwcloud.gs.GridStoreFactory; import com.toshiba.mwcloud.gs.PartitionController; import com.toshiba.mwcloud.gs.Row; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; /** * A class representing GridDBClient. * */ public class GridDBClient extends site.ycsb.DB { //(A)multicast method private String notificationAddress = ""; // "239.0.0.1" private String notificationPort = ""; // "31999" //(B)fixed list method private String notificationMember = ""; // "10.0.0.12:10001,10.0.0.13:10001,10.0.0.14:10001" private String userName = ""; // private String password = ""; // private String clusterName = ""; // "ycsbCluster" public static final String VALUE_COLUMN_NAME_PREFIX= "field"; public static final int ROW_KEY_COLUMN_POS = 0; private String containerPrefix = ""; public static final int DEFAULT_CACHE_CONTAINER_NUM = 1000; public static final int FIELD_NUM = 10; private int numContainer = 0; // Sets PartitionNum public static final GSType SCHEMA_TYPE = GSType.STRING; private GridStore store; private ContainerInfo containerInfo = null; private static final Logger LOGGER = Logger.getLogger(GridDBClient.class.getName()); class RowComparator implements Comparator<Row> { public int compare(Row row1, Row row2) throws NullPointerException { int result = 0; try { Object val1 = row1.getValue(0); Object val2 = row2.getValue(0); result = ((String)val1).compareTo((String)val2); } catch (GSException e) { LOGGER.severe("There is a exception: " + e.getMessage()); throw new NullPointerException(); } return result; } } public void init() throws DBException { LOGGER.info("GridDBClient"); final Properties props = getProperties(); notificationAddress = props.getProperty("notificationAddress"); notificationPort = props.getProperty("notificationPort"); notificationMember = props.getProperty("notificationMember"); clusterName = props.getProperty("clusterName"); userName = props.getProperty("userName"); password = props.getProperty("password"); containerPrefix = props.getProperty("table", "usertable") + "@"; String fieldcount = props.getProperty("fieldcount"); String fieldlength = props.getProperty("fieldlength"); LOGGER.info("notificationAddress=" + notificationAddress + " notificationPort=" + notificationPort + " notificationMember=" + notificationMember); LOGGER.info("clusterName=" + clusterName + " userName=" + userName); LOGGER.info("fieldcount=" + fieldcount + " fieldlength=" + fieldlength); final Properties gridstoreProp = new Properties(); if (clusterName == null || userName == null || password == null) { LOGGER.severe("[ERROR] clusterName or userName or password argument not specified"); throw new DBException(); } if (fieldcount == null || fieldlength == null) { LOGGER.severe("[ERROR] fieldcount or fieldlength argument not specified"); throw new DBException(); } else { if (!fieldcount.equals(String.valueOf(FIELD_NUM)) || !fieldlength.equals("100")) { LOGGER.severe("[ERROR] Invalid argment: fieldcount or fieldlength"); throw new DBException(); } } if (notificationAddress != null) { if (notificationPort == null) { LOGGER.severe("[ERROR] notificationPort argument not specified"); throw new DBException(); } //(A)multicast method gridstoreProp.setProperty("notificationAddress", notificationAddress); gridstoreProp.setProperty("notificationPort", notificationPort); } else if (notificationMember != null) { //(B)fixed list method gridstoreProp.setProperty("notificationMember", notificationMember); } else { LOGGER.severe("[ERROR] notificationAddress and notificationMember argument not specified"); throw new DBException(); } gridstoreProp.setProperty("clusterName", clusterName); gridstoreProp.setProperty("user", userName); gridstoreProp.setProperty("password", password); gridstoreProp.setProperty("containerCacheSize", String.valueOf(DEFAULT_CACHE_CONTAINER_NUM)); List<ColumnInfo> columnInfoList = new ArrayList<ColumnInfo>(); ColumnInfo keyInfo = new ColumnInfo("key", SCHEMA_TYPE); columnInfoList.add(keyInfo); for (int i = 0; i < FIELD_NUM; i++) { String columnName = String.format(VALUE_COLUMN_NAME_PREFIX + "%d", i); ColumnInfo info = new ColumnInfo(columnName, SCHEMA_TYPE); columnInfoList.add(info); } containerInfo = new ContainerInfo(null, ContainerType.COLLECTION, columnInfoList, true); try { GridStoreFactory.getInstance().setProperties(gridstoreProp); store = GridStoreFactory.getInstance().getGridStore(gridstoreProp); PartitionController controller = store.getPartitionController(); numContainer = controller.getPartitionCount(); for(int k = 0; k < numContainer; k++) { String name = containerPrefix + k; store.putContainer(name, containerInfo, false); } } catch (GSException e) { LOGGER.severe("Exception: " + e.getMessage()); throw new DBException(); } LOGGER.info("numContainer=" + numContainer + " containerCasheSize=" + String.valueOf(DEFAULT_CACHE_CONTAINER_NUM)); } public void cleanup() throws DBException { try { store.close(); } catch (GSException e) { LOGGER.severe("Exception when close." + e.getMessage()); throw new DBException(); } } public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { Object rowKey = makeRowKey(key); String containerKey = makeContainerKey(key); final Container<Object, Row> container = store.getContainer(containerKey); if(container == null) { LOGGER.severe("[ERROR]getCollection " + containerKey + " in read()"); return Status.ERROR; } Row targetRow = container.get(rowKey); if (targetRow == null) { LOGGER.severe("[ERROR]get(rowKey) in read()"); return Status.ERROR; } for (int i = 1; i < containerInfo.getColumnCount(); i++) { result.put(containerInfo.getColumnInfo(i).getName(), new ByteArrayByteIterator(targetRow.getValue(i).toString().getBytes())); } return Status.OK; } catch (GSException e) { LOGGER.severe("Exception: " + e.getMessage()); return Status.ERROR; } } public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOGGER.severe("[ERROR]scan() not supported"); return Status.ERROR; } public Status update(String table, String key, Map<String, ByteIterator> values) { try { Object rowKey = makeRowKey(key); String containerKey = makeContainerKey(key); final Container<Object, Row> container = store.getContainer(containerKey); if(container == null) { LOGGER.severe("[ERROR]getCollection " + containerKey + " in update()"); return Status.ERROR; } Row targetRow = container.get(rowKey); if (targetRow == null) { LOGGER.severe("[ERROR]get(rowKey) in update()"); return Status.ERROR; } int setCount = 0; for (int i = 1; i < containerInfo.getColumnCount() && setCount < values.size(); i++) { containerInfo.getColumnInfo(i).getName(); ByteIterator byteIterator = values.get(containerInfo.getColumnInfo(i).getName()); if (byteIterator != null) { Object value = makeValue(byteIterator); targetRow.setValue(i, value); setCount++; } } if (setCount != values.size()) { LOGGER.severe("Error setCount = " + setCount); return Status.ERROR; } container.put(targetRow); return Status.OK; } catch (GSException e) { LOGGER.severe("Exception: " + e.getMessage()); return Status.ERROR; } } public Status insert(String table, String key, Map<String, ByteIterator> values) { try { Object rowKey = makeRowKey(key); String containerKey = makeContainerKey(key); final Container<Object, Row> container = store.getContainer(containerKey); if(container == null) { LOGGER.severe("[ERROR]getCollection " + containerKey + " in insert()"); } Row row = container.createRow(); row.setValue(ROW_KEY_COLUMN_POS, rowKey); for (int i = 1; i < containerInfo.getColumnCount(); i++) { ByteIterator byteIterator = values.get(containerInfo.getColumnInfo(i).getName()); Object value = makeValue(byteIterator); row.setValue(i, value); } container.put(row); } catch (GSException e) { LOGGER.severe("Exception: " + e.getMessage()); return Status.ERROR; } return Status.OK; } public Status delete(String table, String key) { try { Object rowKey = makeRowKey(key); String containerKey = makeContainerKey(key); final Container<Object, Row> container = store.getContainer(containerKey); if(container == null) { LOGGER.severe("[ERROR]getCollection " + containerKey + " in read()"); return Status.ERROR; } boolean isDelete = container.remove(rowKey); if (!isDelete) { LOGGER.severe("[ERROR]remove(rowKey) in remove()"); return Status.ERROR; } }catch (GSException e) { LOGGER.severe("Exception: " + e.getMessage()); return Status.ERROR; } return Status.OK; } protected String makeContainerKey(String key) { return containerPrefix + Math.abs(key.hashCode() % numContainer); } protected Object makeRowKey(String key) { return key; } protected Object makeValue(ByteIterator byteIterator) { return byteIterator.toString(); } protected Object makeQueryLiteral(Object value) { return "'" + value.toString() + "'"; } }
11,403
33.143713
104
java
null
NearPMSW-main/baseline/logging/YCSB2/maprjsondb/src/main/java/site/ycsb/db/mapr/package-info.java
/* * Copyright (c) 2017, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://mapr.com/maprjsondb/">MapR JSON DB</a>. */ package site.ycsb.db.mapr;
769
32.478261
79
java
null
NearPMSW-main/baseline/logging/YCSB2/maprjsondb/src/main/java/site/ycsb/db/mapr/ValueByteIterator.java
/* * Copyright (c) 2017, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.mapr; import org.ojai.Value; import org.ojai.util.Values; import site.ycsb.ByteIterator; /** * OJAI Value byte iterator. * * Used for parsing the document fetched MapR JSON DB */ public class ValueByteIterator extends ByteIterator { private Value value; public ValueByteIterator(Value value) { this.value = value; } @Override public boolean hasNext() { return false; } @Override public byte nextByte() { return 0; } @Override public long bytesLeft() { return 0; } @Override public String toString() { return Values.asJsonString(value); } }
1,279
20.694915
70
java
null
NearPMSW-main/baseline/logging/YCSB2/maprjsondb/src/main/java/site/ycsb/db/mapr/MapRJSONDBClient.java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.mapr; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Vector; import org.ojai.Document; import org.ojai.DocumentConstants; import org.ojai.DocumentStream; import org.ojai.Value; import org.ojai.store.Connection; import org.ojai.store.DocumentMutation; import org.ojai.store.DocumentStore; import org.ojai.store.Driver; import org.ojai.store.DriverManager; import org.ojai.store.Query; import org.ojai.store.QueryCondition; import org.ojai.store.QueryCondition.Op; import site.ycsb.ByteIterator; import site.ycsb.Status; /** * MapR-DB(json) client for YCSB framework. * */ public class MapRJSONDBClient extends site.ycsb.DB { private Connection connection = null; private DocumentStore documentStore = null; private Driver driver = null; @Override public void init() { connection = DriverManager.getConnection("ojai:mapr:"); driver = connection.getDriver(); } @Override public void cleanup() { documentStore.close(); connection.close(); } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { DocumentStore docStore = getTable(table); Document doc = docStore.findById(key, getFieldPaths(fields)); buildRowResult(doc, result); return Status.OK; } catch (Exception e) { return Status.ERROR; } } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { DocumentStore docStore = getTable(table); QueryCondition condition = driver.newCondition() .is(DocumentConstants.ID_FIELD, Op.GREATER_OR_EQUAL, startkey) .build(); Query query = driver.newQuery() .select(getFieldPaths(fields)) .where(condition) .build(); try (DocumentStream stream = docStore.findQuery(query)) { int numResults = 0; for (Document record : stream) { result.add(buildRowResult(record)); numResults++; if (numResults >= recordcount) { break; } } } return Status.OK; } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { DocumentStore docStore = getTable(table); docStore.update(key, newMutation(values)); return Status.OK; } catch (Exception e) { return Status.ERROR; } } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { DocumentStore docStore = getTable(table); docStore.insertOrReplace(key, newDocument(values)); return Status.OK; } catch (Exception e) { return Status.ERROR; } } @Override public Status delete(String table, String key) { try { DocumentStore docStore = getTable(table); docStore.delete(key); return Status.OK; } catch (Exception e) { return Status.ERROR; } } /** * Get the OJAI DocumentStore instance for a given table. * * @param tableName * @return */ private DocumentStore getTable(String tableName) { if (documentStore == null) { documentStore = connection.getStore(tableName); } return documentStore; } /** * Construct a Document object from the map of OJAI values. * * @param values * @return */ private Document newDocument(Map<String, ByteIterator> values) { Document document = driver.newDocument(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { document.set(entry.getKey(), entry.getValue().toArray()); } return document; } /** * Build a DocumentMutation object for the values specified. * @param values * @return */ private DocumentMutation newMutation(Map<String, ByteIterator> values) { DocumentMutation mutation = driver.newMutation(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { mutation.setOrReplace(entry.getKey(), ByteBuffer.wrap(entry.getValue().toArray())); } return mutation; } /** * Get field path array from the set. * * @param fields * @return */ private String[] getFieldPaths(Set<String> fields) { if (fields != null) { return fields.toArray(new String[fields.size()]); } return new String[0]; } /** * Build result the map from the Document passed. * * @param document * @return */ private HashMap<String, ByteIterator> buildRowResult(Document document) { return buildRowResult(document, null); } /** * Build result the map from the Document passed. * * @param document * @param result * @return */ private HashMap<String, ByteIterator> buildRowResult(Document document, Map<String, ByteIterator> result) { if (document != null) { if (result == null) { result = new HashMap<String, ByteIterator>(); } for (Map.Entry<String, Value> kv : document) { result.put(kv.getKey(), new ValueByteIterator(kv.getValue())); } } return (HashMap<String, ByteIterator>)result; } }
5,972
25.546667
75
java
null
NearPMSW-main/baseline/logging/YCSB2/rados/src/test/java/site/ycsb/db/RadosClientTest.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import static org.junit.Assert.assertEquals; import static org.junit.Assume.assumeNoException; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.junit.AfterClass; import org.junit.After; import org.junit.BeforeClass; import org.junit.Before; import org.junit.Test; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.UUID; /** * Test for the binding of <a href="http://ceph.org/">RADOS of Ceph</a>. * * See {@code rados/README.md} for details. */ public class RadosClientTest { private static RadosClient radosclient; public static final String POOL_PROPERTY = "rados.pool"; public static final String POOL_TEST = "rbd"; private static final String TABLE_NAME = "table0"; private static final String KEY0 = "key0"; private static final String KEY1 = "key1"; private static final String KEY2 = "key2"; private static final HashMap<String, ByteIterator> DATA; private static final HashMap<String, ByteIterator> DATA_UPDATED; static { DATA = new HashMap<String, ByteIterator>(10); DATA_UPDATED = new HashMap<String, ByteIterator>(10); for (int i = 0; i < 10; i++) { String key = "key" + UUID.randomUUID(); DATA.put(key, new StringByteIterator("data" + UUID.randomUUID())); DATA_UPDATED.put(key, new StringByteIterator("data" + UUID.randomUUID())); } } @BeforeClass public static void setupClass() throws DBException { radosclient = new RadosClient(); Properties p = new Properties(); p.setProperty(POOL_PROPERTY, POOL_TEST); try { radosclient.setProperties(p); radosclient.init(); } catch (DBException|UnsatisfiedLinkError e) { assumeNoException("Ceph cluster is not running. Skipping tests.", e); } } @AfterClass public static void teardownClass() throws DBException { if (radosclient != null) { radosclient.cleanup(); } } @Before public void setUp() { radosclient.insert(TABLE_NAME, KEY0, DATA); } @After public void tearDown() { radosclient.delete(TABLE_NAME, KEY0); } @Test public void insertTest() { Status result = radosclient.insert(TABLE_NAME, KEY1, DATA); assertEquals(Status.OK, result); } @Test public void updateTest() { radosclient.insert(TABLE_NAME, KEY2, DATA); Status result = radosclient.update(TABLE_NAME, KEY2, DATA_UPDATED); assertEquals(Status.OK, result); HashMap<String, ByteIterator> ret = new HashMap<String, ByteIterator>(10); radosclient.read(TABLE_NAME, KEY2, DATA.keySet(), ret); compareMap(DATA_UPDATED, ret); radosclient.delete(TABLE_NAME, KEY2); } @Test public void readTest() { HashMap<String, ByteIterator> ret = new HashMap<String, ByteIterator>(10); Status result = radosclient.read(TABLE_NAME, KEY0, DATA.keySet(), ret); assertEquals(Status.OK, result); compareMap(DATA, ret); } private void compareMap(HashMap<String, ByteIterator> src, HashMap<String, ByteIterator> dest) { assertEquals(src.size(), dest.size()); Set setSrc = src.entrySet(); Iterator<Map.Entry> itSrc = setSrc.iterator(); for (int i = 0; i < 10; i++) { Map.Entry<String, ByteIterator> entrySrc = itSrc.next(); assertEquals(entrySrc.getValue().toString(), dest.get(entrySrc.getKey()).toString()); } } @Test public void deleteTest() { Status result = radosclient.delete(TABLE_NAME, KEY0); assertEquals(Status.OK, result); } }
4,287
27.397351
98
java
null
NearPMSW-main/baseline/logging/YCSB2/rados/src/main/java/site/ycsb/db/package-info.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * YCSB binding for RADOS of Ceph. */ package site.ycsb.db;
724
31.954545
70
java
null
NearPMSW-main/baseline/logging/YCSB2/rados/src/main/java/site/ycsb/db/RadosClient.java
/** * Copyright (c) 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import com.ceph.rados.Rados; import com.ceph.rados.IoCTX; import com.ceph.rados.jna.RadosObjectInfo; import com.ceph.rados.ReadOp; import com.ceph.rados.ReadOp.ReadResult; import com.ceph.rados.exceptions.RadosException; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.Vector; import org.json.JSONObject; /** * YCSB binding for <a href="http://ceph.org/">RADOS of Ceph</a>. * * See {@code rados/README.md} for details. */ public class RadosClient extends DB { private Rados rados; private IoCTX ioctx; public static final String CONFIG_FILE_PROPERTY = "rados.configfile"; public static final String CONFIG_FILE_DEFAULT = "/etc/ceph/ceph.conf"; public static final String ID_PROPERTY = "rados.id"; public static final String ID_DEFAULT = "admin"; public static final String POOL_PROPERTY = "rados.pool"; public static final String POOL_DEFAULT = "data"; private boolean isInited = false; public void init() throws DBException { Properties props = getProperties(); String configfile = props.getProperty(CONFIG_FILE_PROPERTY); if (configfile == null) { configfile = CONFIG_FILE_DEFAULT; } String id = props.getProperty(ID_PROPERTY); if (id == null) { id = ID_DEFAULT; } String pool = props.getProperty(POOL_PROPERTY); if (pool == null) { pool = POOL_DEFAULT; } // try { // } catch (UnsatisfiedLinkError e) { // throw new DBException("RADOS library is not loaded."); // } rados = new Rados(id); try { rados.confReadFile(new File(configfile)); rados.connect(); ioctx = rados.ioCtxCreate(pool); } catch (RadosException e) { throw new DBException(e.getMessage() + ": " + e.getReturnValue()); } isInited = true; } public void cleanup() throws DBException { if (isInited) { rados.shutDown(); rados.ioCtxDestroy(ioctx); isInited = false; } } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { byte[] buffer; try { RadosObjectInfo info = ioctx.stat(key); buffer = new byte[(int)info.getSize()]; ReadOp rop = ioctx.readOpCreate(); ReadResult readResult = rop.queueRead(0, info.getSize()); // TODO: more size than byte length possible; // rop.operate(key, Rados.OPERATION_NOFLAG); // for rados-java 0.3.0 rop.operate(key, 0); // readResult.raiseExceptionOnError("Error ReadOP(%d)", readResult.getRVal()); // for rados-java 0.3.0 if (readResult.getRVal() < 0) { throw new RadosException("Error ReadOP", readResult.getRVal()); } if (info.getSize() != readResult.getBytesRead()) { return new Status("ERROR", "Error the object size read"); } readResult.getBuffer().get(buffer); } catch (RadosException e) { return new Status("ERROR-" + e.getReturnValue(), e.getMessage()); } JSONObject json = new JSONObject(new String(buffer, java.nio.charset.StandardCharsets.UTF_8)); Set<String> fieldsToReturn = (fields == null ? json.keySet() : fields); for (String name : fieldsToReturn) { result.put(name, new StringByteIterator(json.getString(name))); } return result.isEmpty() ? Status.ERROR : Status.OK; } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { JSONObject json = new JSONObject(); for (final Entry<String, ByteIterator> e : values.entrySet()) { json.put(e.getKey(), e.getValue().toString()); } try { ioctx.write(key, json.toString()); } catch (RadosException e) { return new Status("ERROR-" + e.getReturnValue(), e.getMessage()); } return Status.OK; } @Override public Status delete(String table, String key) { try { ioctx.remove(key); } catch (RadosException e) { return new Status("ERROR-" + e.getReturnValue(), e.getMessage()); } return Status.OK; } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { Status rtn = delete(table, key); if (rtn.equals(Status.OK)) { return insert(table, key, values); } return rtn; } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { return Status.NOT_IMPLEMENTED; } }
5,352
28.738889
108
java
null
NearPMSW-main/baseline/logging/YCSB2/s3/src/main/java/site/ycsb/db/package-info.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. * * S3 storage client binding for YCSB. */ package site.ycsb.db;
724
31.954545
70
java
null
NearPMSW-main/baseline/logging/YCSB2/s3/src/main/java/site/ycsb/db/S3Client.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. * * S3 storage client binding for YCSB. */ package site.ycsb.db; import java.util.HashMap; import java.util.Properties; import java.util.Set; import java.util.Vector; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.net.*; import com.amazonaws.util.IOUtils; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import com.amazonaws.services.s3.AmazonS3Client; import com.amazonaws.services.s3.*; import com.amazonaws.auth.*; import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.PutObjectResult; import com.amazonaws.services.s3.model.S3Object; import com.amazonaws.services.s3.model.GetObjectRequest; import com.amazonaws.ClientConfiguration; import com.amazonaws.regions.Region; import com.amazonaws.regions.Regions; import com.amazonaws.Protocol; import com.amazonaws.services.s3.model.DeleteObjectRequest; import com.amazonaws.services.s3.model.ObjectListing; import com.amazonaws.services.s3.model.S3ObjectSummary; import com.amazonaws.services.s3.model.SSECustomerKey; import com.amazonaws.services.s3.model.PutObjectRequest; /** * S3 Storage client for YCSB framework. * * Properties to set: * * s3.accessKeyId=access key S3 aws * s3.secretKey=secret key S3 aws * s3.endPoint=s3.amazonaws.com * s3.region=us-east-1 * The parameter table is the name of the Bucket where to upload the files. * This must be created before to start the benchmark * The size of the file to upload is determined by two parameters: * - fieldcount this is the number of fields of a record in YCSB * - fieldlength this is the size in bytes of a single field in the record * together these two parameters define the size of the file to upload, * the size in bytes is given by the fieldlength multiplied by the fieldcount. * The name of the file is determined by the parameter key. *This key is automatically generated by YCSB. * */ public class S3Client extends DB { private static AmazonS3Client s3Client; private static String sse; private static SSECustomerKey ssecKey; private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); /** * Cleanup any state for this storage. * Called once per S3 instance; */ @Override public void cleanup() throws DBException { if (INIT_COUNT.decrementAndGet() == 0) { try { s3Client.shutdown(); System.out.println("The client is shutdown successfully"); } catch (Exception e){ System.err.println("Could not shutdown the S3Client: "+e.toString()); e.printStackTrace(); } finally { if (s3Client != null){ s3Client = null; } } } } /** * Delete a file from S3 Storage. * * @param bucket * The name of the bucket * @param key * The record key of the file to delete. * @return OK on success, otherwise ERROR. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status delete(String bucket, String key) { try { s3Client.deleteObject(new DeleteObjectRequest(bucket, key)); } catch (Exception e){ System.err.println("Not possible to delete the key "+key); e.printStackTrace(); return Status.ERROR; } return Status.OK; } /** * Initialize any state for the storage. * Called once per S3 instance; If the client is not null it is re-used. */ @Override public void init() throws DBException { final int count = INIT_COUNT.incrementAndGet(); synchronized (S3Client.class){ Properties propsCL = getProperties(); int recordcount = Integer.parseInt( propsCL.getProperty("recordcount")); int operationcount = Integer.parseInt( propsCL.getProperty("operationcount")); int numberOfOperations = 0; if (recordcount > 0){ if (recordcount > operationcount){ numberOfOperations = recordcount; } else { numberOfOperations = operationcount; } } else { numberOfOperations = operationcount; } if (count <= numberOfOperations) { String accessKeyId = null; String secretKey = null; String endPoint = null; String region = null; String maxErrorRetry = null; String maxConnections = null; String protocol = null; BasicAWSCredentials s3Credentials; ClientConfiguration clientConfig; if (s3Client != null) { System.out.println("Reusing the same client"); return; } try { InputStream propFile = S3Client.class.getClassLoader() .getResourceAsStream("s3.properties"); Properties props = new Properties(System.getProperties()); props.load(propFile); accessKeyId = props.getProperty("s3.accessKeyId"); if (accessKeyId == null){ accessKeyId = propsCL.getProperty("s3.accessKeyId"); } System.out.println(accessKeyId); secretKey = props.getProperty("s3.secretKey"); if (secretKey == null){ secretKey = propsCL.getProperty("s3.secretKey"); } System.out.println(secretKey); endPoint = props.getProperty("s3.endPoint"); if (endPoint == null){ endPoint = propsCL.getProperty("s3.endPoint", "s3.amazonaws.com"); } System.out.println(endPoint); region = props.getProperty("s3.region"); if (region == null){ region = propsCL.getProperty("s3.region", "us-east-1"); } System.out.println(region); maxErrorRetry = props.getProperty("s3.maxErrorRetry"); if (maxErrorRetry == null){ maxErrorRetry = propsCL.getProperty("s3.maxErrorRetry", "15"); } maxConnections = props.getProperty("s3.maxConnections"); if (maxConnections == null){ maxConnections = propsCL.getProperty("s3.maxConnections"); } protocol = props.getProperty("s3.protocol"); if (protocol == null){ protocol = propsCL.getProperty("s3.protocol", "HTTPS"); } sse = props.getProperty("s3.sse"); if (sse == null){ sse = propsCL.getProperty("s3.sse", "false"); } String ssec = props.getProperty("s3.ssec"); if (ssec == null){ ssec = propsCL.getProperty("s3.ssec", null); } else { ssecKey = new SSECustomerKey(ssec); } } catch (Exception e){ System.err.println("The file properties doesn't exist "+e.toString()); e.printStackTrace(); } try { System.out.println("Inizializing the S3 connection"); s3Credentials = new BasicAWSCredentials(accessKeyId, secretKey); clientConfig = new ClientConfiguration(); clientConfig.setMaxErrorRetry(Integer.parseInt(maxErrorRetry)); if(protocol.equals("HTTP")) { clientConfig.setProtocol(Protocol.HTTP); } else { clientConfig.setProtocol(Protocol.HTTPS); } if(maxConnections != null) { clientConfig.setMaxConnections(Integer.parseInt(maxConnections)); } s3Client = new AmazonS3Client(s3Credentials, clientConfig); s3Client.setRegion(Region.getRegion(Regions.fromName(region))); s3Client.setEndpoint(endPoint); System.out.println("Connection successfully initialized"); } catch (Exception e){ System.err.println("Could not connect to S3 storage: "+ e.toString()); e.printStackTrace(); throw new DBException(e); } } else { System.err.println( "The number of threads must be less or equal than the operations"); throw new DBException(new Error( "The number of threads must be less or equal than the operations")); } } } /** * Create a new File in the Bucket. Any field/value pairs in the specified * values HashMap will be written into the file with the specified record * key. * * @param bucket * The name of the bucket * @param key * The record key of the file to insert. * @param values * A HashMap of field/value pairs to insert in the file. * Only the content of the first field is written to a byteArray * multiplied by the number of field. In this way the size * of the file to upload is determined by the fieldlength * and fieldcount parameters. * @return OK on success, ERROR otherwise. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status insert(String bucket, String key, Map<String, ByteIterator> values) { return writeToStorage(bucket, key, values, true, sse, ssecKey); } /** * Read a file from the Bucket. Each field/value pair from the result * will be stored in a HashMap. * * @param bucket * The name of the bucket * @param key * The record key of the file to read. * @param fields * The list of fields to read, or null for all of them, * it is null by default * @param result * A HashMap of field/value pairs for the result * @return OK on success, ERROR otherwise. */ @Override public Status read(String bucket, String key, Set<String> fields, Map<String, ByteIterator> result) { return readFromStorage(bucket, key, result, ssecKey); } /** * Update a file in the database. Any field/value pairs in the specified * values HashMap will be written into the file with the specified file * key, overwriting any existing values with the same field name. * * @param bucket * The name of the bucket * @param key * The file key of the file to write. * @param values * A HashMap of field/value pairs to update in the record * @return OK on success, ERORR otherwise. */ @Override public Status update(String bucket, String key, Map<String, ByteIterator> values) { return writeToStorage(bucket, key, values, false, sse, ssecKey); } /** * Perform a range scan for a set of files in the bucket. Each * field/value pair from the result will be stored in a HashMap. * * @param bucket * The name of the bucket * @param startkey * The file key of the first file to read. * @param recordcount * The number of files to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one file * @return OK on success, ERROR otherwise. */ @Override public Status scan(String bucket, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { return scanFromStorage(bucket, startkey, recordcount, result, ssecKey); } /** * Upload a new object to S3 or update an object on S3. * * @param bucket * The name of the bucket * @param key * The file key of the object to upload/update. * @param values * The data to be written on the object * @param updateMarker * A boolean value. If true a new object will be uploaded * to S3. If false an existing object will be re-uploaded * */ protected Status writeToStorage(String bucket, String key, Map<String, ByteIterator> values, Boolean updateMarker, String sseLocal, SSECustomerKey ssecLocal) { int totalSize = 0; int fieldCount = values.size(); //number of fields to concatenate // getting the first field in the values Object keyToSearch = values.keySet().toArray()[0]; // getting the content of just one field byte[] sourceArray = values.get(keyToSearch).toArray(); int sizeArray = sourceArray.length; //size of each array if (updateMarker){ totalSize = sizeArray*fieldCount; } else { try { S3Object object = getS3ObjectAndMetadata(bucket, key, ssecLocal); int sizeOfFile = (int)object.getObjectMetadata().getContentLength(); fieldCount = sizeOfFile/sizeArray; totalSize = sizeOfFile; object.close(); } catch (Exception e){ System.err.println("Not possible to get the object :"+key); e.printStackTrace(); return Status.ERROR; } } byte[] destinationArray = new byte[totalSize]; int offset = 0; for (int i = 0; i < fieldCount; i++) { System.arraycopy(sourceArray, 0, destinationArray, offset, sizeArray); offset += sizeArray; } try (InputStream input = new ByteArrayInputStream(destinationArray)) { ObjectMetadata metadata = new ObjectMetadata(); metadata.setContentLength(totalSize); PutObjectRequest putObjectRequest = null; if (sseLocal.equals("true")) { metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); putObjectRequest = new PutObjectRequest(bucket, key, input, metadata); } else if (ssecLocal != null) { putObjectRequest = new PutObjectRequest(bucket, key, input, metadata).withSSECustomerKey(ssecLocal); } else { putObjectRequest = new PutObjectRequest(bucket, key, input, metadata); } try { PutObjectResult res = s3Client.putObject(putObjectRequest); if(res.getETag() == null) { return Status.ERROR; } else { if (sseLocal.equals("true")) { System.out.println("Uploaded object encryption status is " + res.getSSEAlgorithm()); } else if (ssecLocal != null) { System.out.println("Uploaded object encryption status is " + res.getSSEAlgorithm()); } } } catch (Exception e) { System.err.println("Not possible to write object :"+key); e.printStackTrace(); return Status.ERROR; } } catch (Exception e) { System.err.println("Error in the creation of the stream :"+e.toString()); e.printStackTrace(); return Status.ERROR; } return Status.OK; } /** * Download an object from S3. * * @param bucket * The name of the bucket * @param key * The file key of the object to upload/update. * @param result * The Hash map where data from the object are written * */ protected Status readFromStorage(String bucket, String key, Map<String, ByteIterator> result, SSECustomerKey ssecLocal) { try { S3Object object = getS3ObjectAndMetadata(bucket, key, ssecLocal); InputStream objectData = object.getObjectContent(); //consuming the stream // writing the stream to bytes and to results result.put(key, new ByteArrayByteIterator(IOUtils.toByteArray(objectData))); objectData.close(); object.close(); } catch (Exception e){ System.err.println("Not possible to get the object "+key); e.printStackTrace(); return Status.ERROR; } return Status.OK; } private S3Object getS3ObjectAndMetadata(String bucket, String key, SSECustomerKey ssecLocal) { GetObjectRequest getObjectRequest; if (ssecLocal != null) { getObjectRequest = new GetObjectRequest(bucket, key).withSSECustomerKey(ssecLocal); } else { getObjectRequest = new GetObjectRequest(bucket, key); } return s3Client.getObject(getObjectRequest); } /** * Perform an emulation of a database scan operation on a S3 bucket. * * @param bucket * The name of the bucket * @param startkey * The file key of the first file to read. * @param recordcount * The number of files to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one file * */ protected Status scanFromStorage(String bucket, String startkey, int recordcount, Vector<HashMap<String, ByteIterator>> result, SSECustomerKey ssecLocal) { int counter = 0; ObjectListing listing = s3Client.listObjects(bucket); List<S3ObjectSummary> summaries = listing.getObjectSummaries(); List<String> keyList = new ArrayList(); int startkeyNumber = 0; int numberOfIteration = 0; // getting the list of files in the bucket while (listing.isTruncated()) { listing = s3Client.listNextBatchOfObjects(listing); summaries.addAll(listing.getObjectSummaries()); } for (S3ObjectSummary summary : summaries) { String summaryKey = summary.getKey(); keyList.add(summaryKey); } // Sorting the list of files in Alphabetical order Collections.sort(keyList); // sorting the list // Getting the position of the startingfile for the scan for (String key : keyList) { if (key.equals(startkey)){ startkeyNumber = counter; } else { counter = counter + 1; } } // Checking if the total number of file is bigger than the file to read, // if not using the total number of Files if (recordcount < keyList.size()) { numberOfIteration = recordcount; } else { numberOfIteration = keyList.size(); } // Reading the Files starting from the startkey File till the end // of the Files or Till the recordcount number for (int i = startkeyNumber; i < numberOfIteration; i++){ HashMap<String, ByteIterator> resultTemp = new HashMap<String, ByteIterator>(); readFromStorage(bucket, keyList.get(i), resultTemp, ssecLocal); result.add(resultTemp); } return Status.OK; } }
18,959
35.531792
108
java
null
NearPMSW-main/baseline/logging/YCSB2/accumulo1.9/src/test/java/site/ycsb/db/accumulo/AccumuloTest.java
/* * Copyright (c) 2016 YCSB contributors. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.accumulo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import java.util.Map.Entry; import java.util.Properties; import site.ycsb.Workload; import site.ycsb.DB; import site.ycsb.measurements.Measurements; import site.ycsb.workloads.CoreWorkload; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.minicluster.MiniAccumuloCluster; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.rules.TestName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Use an Accumulo MiniCluster to test out basic workload operations with * the Accumulo binding. */ public class AccumuloTest { private static final Logger LOG = LoggerFactory.getLogger(AccumuloTest.class); private static final int INSERT_COUNT = 2000; private static final int TRANSACTION_COUNT = 2000; @ClassRule public static TemporaryFolder workingDir = new TemporaryFolder(); @Rule public TestName test = new TestName(); private static MiniAccumuloCluster cluster; private static Properties properties; private Workload workload; private DB client; private Properties workloadProps; private static boolean isWindows() { final String os = System.getProperty("os.name"); return os.startsWith("Windows"); } @BeforeClass public static void setup() throws Exception { // Minicluster setup fails on Windows with an UnsatisfiedLinkError. // Skip if windows. assumeTrue(!isWindows()); cluster = new MiniAccumuloCluster(workingDir.newFolder("accumulo").getAbsoluteFile(), "protectyaneck"); LOG.debug("starting minicluster"); cluster.start(); LOG.debug("creating connection for admin operations."); // set up the table and user final Connector admin = cluster.getConnector("root", "protectyaneck"); admin.tableOperations().create(CoreWorkload.TABLENAME_PROPERTY_DEFAULT); admin.securityOperations().createLocalUser("ycsb", new PasswordToken("protectyaneck")); admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.READ); admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.WRITE); // set properties the binding will read properties = new Properties(); properties.setProperty("accumulo.zooKeepers", cluster.getZooKeepers()); properties.setProperty("accumulo.instanceName", cluster.getInstanceName()); properties.setProperty("accumulo.columnFamily", "family"); properties.setProperty("accumulo.username", "ycsb"); properties.setProperty("accumulo.password", "protectyaneck"); // cut down the batch writer timeout so that writes will push through. properties.setProperty("accumulo.batchWriterMaxLatency", "4"); // set these explicitly to the defaults at the time we're compiled, since they'll be inlined in our class. properties.setProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT); properties.setProperty(CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT); properties.setProperty(CoreWorkload.INSERT_ORDER_PROPERTY, "ordered"); } @AfterClass public static void clusterCleanup() throws Exception { if (cluster != null) { LOG.debug("shutting down minicluster"); cluster.stop(); cluster = null; } } @Before public void client() throws Exception { LOG.debug("Loading workload properties for {}", test.getMethodName()); workloadProps = new Properties(); workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName())); for (String prop : properties.stringPropertyNames()) { workloadProps.setProperty(prop, properties.getProperty(prop)); } // TODO we need a better test rig for 'run this ycsb workload' LOG.debug("initializing measurements and workload"); Measurements.setProperties(workloadProps); workload = new CoreWorkload(); workload.init(workloadProps); LOG.debug("initializing client"); client = new AccumuloClient(); client.setProperties(workloadProps); client.init(); } @After public void cleanup() throws Exception { if (client != null) { LOG.debug("cleaning up client"); client.cleanup(); client = null; } if (workload != null) { LOG.debug("cleaning up workload"); workload.cleanup(); } } @After public void truncateTable() throws Exception { if (cluster != null) { LOG.debug("truncating table {}", CoreWorkload.TABLENAME_PROPERTY_DEFAULT); final Connector admin = cluster.getConnector("root", "protectyaneck"); admin.tableOperations().deleteRows(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, null, null); } } @Test public void workloada() throws Exception { runWorkload(); } @Test public void workloadb() throws Exception { runWorkload(); } @Test public void workloadc() throws Exception { runWorkload(); } @Test public void workloadd() throws Exception { runWorkload(); } @Test public void workloade() throws Exception { runWorkload(); } /** * go through a workload cycle. * <ol> * <li>initialize thread-specific state * <li>load the workload dataset * <li>run workload transactions * </ol> */ private void runWorkload() throws Exception { final Object state = workload.initThread(workloadProps,0,0); LOG.debug("load"); for (int i = 0; i < INSERT_COUNT; i++) { assertTrue("insert failed.", workload.doInsert(client, state)); } // Ensure we wait long enough for the batch writer to flush // TODO accumulo client should be flushing per insert by default. Thread.sleep(2000); LOG.debug("verify number of cells"); final Scanner scanner = cluster.getConnector("root", "protectyaneck").createScanner(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, Authorizations.EMPTY); int count = 0; for (Entry<Key, Value> entry : scanner) { count++; } assertEquals("Didn't get enough total cells.", (Integer.valueOf(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT) * INSERT_COUNT), count); LOG.debug("run"); for (int i = 0; i < TRANSACTION_COUNT; i++) { assertTrue("transaction failed.", workload.doTransaction(client, state)); } } }
7,583
33.630137
151
java
null
NearPMSW-main/baseline/logging/YCSB2/accumulo1.9/src/main/java/site/ycsb/db/accumulo/package-info.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * YCSB binding for <a href="https://accumulo.apache.org/">Apache Accumulo</a>. */ package site.ycsb.db.accumulo;
779
32.913043
79
java
null
NearPMSW-main/baseline/logging/YCSB2/accumulo1.9/src/main/java/site/ycsb/db/accumulo/AccumuloClient.java
/** * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.accumulo; import static java.nio.charset.StandardCharsets.UTF_8; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.SortedMap; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.ClientConfiguration; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.MutationsRejectedException; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.client.ZooKeeperInstance; import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.iterators.user.WholeRowIterator; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.util.CleanUp; import org.apache.hadoop.io.Text; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; /** * <a href="https://accumulo.apache.org/">Accumulo</a> binding for YCSB. */ public class AccumuloClient extends DB { private ZooKeeperInstance inst; private Connector connector; private Text colFam = new Text(""); private byte[] colFamBytes = new byte[0]; private final ConcurrentHashMap<String, BatchWriter> writers = new ConcurrentHashMap<>(); static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { CleanUp.shutdownNow(); } }); } @Override public void init() throws DBException { colFam = new Text(getProperties().getProperty("accumulo.columnFamily")); colFamBytes = colFam.toString().getBytes(UTF_8); inst = new ZooKeeperInstance(new ClientConfiguration() .withInstance(getProperties().getProperty("accumulo.instanceName")) .withZkHosts(getProperties().getProperty("accumulo.zooKeepers"))); try { String principal = getProperties().getProperty("accumulo.username"); AuthenticationToken token = new PasswordToken(getProperties().getProperty("accumulo.password")); connector = inst.getConnector(principal, token); } catch (AccumuloException | AccumuloSecurityException e) { throw new DBException(e); } if (!(getProperties().getProperty("accumulo.pcFlag", "none").equals("none"))) { System.err.println("Sorry, the ZK based producer/consumer implementation has been removed. " + "Please see YCSB issue #416 for work on adding a general solution to coordinated work."); } } @Override public void cleanup() throws DBException { try { Iterator<BatchWriter> iterator = writers.values().iterator(); while (iterator.hasNext()) { BatchWriter writer = iterator.next(); writer.close(); iterator.remove(); } } catch (MutationsRejectedException e) { throw new DBException(e); } } /** * Called when the user specifies a table that isn't the same as the existing * table. Connect to it and if necessary, close our current connection. * * @param table * The table to open. */ public BatchWriter getWriter(String table) throws TableNotFoundException { // tl;dr We're paying a cost for the ConcurrentHashMap here to deal with the DB api. // We know that YCSB is really only ever going to send us data for one table, so using // a concurrent data structure is overkill (especially in such a hot code path). // However, the impact seems to be relatively negligible in trivial local tests and it's // "more correct" WRT to the API. BatchWriter writer = writers.get(table); if (null == writer) { BatchWriter newWriter = createBatchWriter(table); BatchWriter oldWriter = writers.putIfAbsent(table, newWriter); // Someone beat us to creating a BatchWriter for this table, use their BatchWriters if (null != oldWriter) { try { // Make sure to clean up our new batchwriter! newWriter.close(); } catch (MutationsRejectedException e) { throw new RuntimeException(e); } writer = oldWriter; } else { writer = newWriter; } } return writer; } /** * Creates a BatchWriter with the expected configuration. * * @param table The table to write to */ private BatchWriter createBatchWriter(String table) throws TableNotFoundException { BatchWriterConfig bwc = new BatchWriterConfig(); bwc.setMaxLatency( Long.parseLong(getProperties() .getProperty("accumulo.batchWriterMaxLatency", "30000")), TimeUnit.MILLISECONDS); bwc.setMaxMemory(Long.parseLong( getProperties().getProperty("accumulo.batchWriterSize", "100000"))); final String numThreadsValue = getProperties().getProperty("accumulo.batchWriterThreads"); // Try to saturate the client machine. int numThreads = Math.max(1, Runtime.getRuntime().availableProcessors() / 2); if (null != numThreadsValue) { numThreads = Integer.parseInt(numThreadsValue); } System.err.println("Using " + numThreads + " threads to write data"); bwc.setMaxWriteThreads(numThreads); return connector.createBatchWriter(table, bwc); } /** * Gets a scanner from Accumulo over one row. * * @param row the row to scan * @param fields the set of columns to scan * @return an Accumulo {@link Scanner} bound to the given row and columns */ private Scanner getRow(String table, Text row, Set<String> fields) throws TableNotFoundException { Scanner scanner = connector.createScanner(table, Authorizations.EMPTY); scanner.setRange(new Range(row)); if (fields != null) { for (String field : fields) { scanner.fetchColumn(colFam, new Text(field)); } } return scanner; } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Scanner scanner = null; try { scanner = getRow(table, new Text(key), null); // Pick out the results we care about. final Text cq = new Text(); for (Entry<Key, Value> entry : scanner) { entry.getKey().getColumnQualifier(cq); Value v = entry.getValue(); byte[] buf = v.get(); result.put(cq.toString(), new ByteArrayByteIterator(buf)); } } catch (Exception e) { System.err.println("Error trying to reading Accumulo table " + table + " " + key); e.printStackTrace(); return Status.ERROR; } finally { if (null != scanner) { scanner.close(); } } return Status.OK; } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { // Just make the end 'infinity' and only read as much as we need. Scanner scanner = null; try { scanner = connector.createScanner(table, Authorizations.EMPTY); scanner.setRange(new Range(new Text(startkey), null)); // Have Accumulo send us complete rows, serialized in a single Key-Value pair IteratorSetting cfg = new IteratorSetting(100, WholeRowIterator.class); scanner.addScanIterator(cfg); // If no fields are provided, we assume one column/row. if (fields != null) { // And add each of them as fields we want. for (String field : fields) { scanner.fetchColumn(colFam, new Text(field)); } } int count = 0; for (Entry<Key, Value> entry : scanner) { // Deserialize the row SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue()); HashMap<String, ByteIterator> rowData; if (null != fields) { rowData = new HashMap<>(fields.size()); } else { rowData = new HashMap<>(); } result.add(rowData); // Parse the data in the row, avoid unnecessary Text object creation final Text cq = new Text(); for (Entry<Key, Value> rowEntry : row.entrySet()) { rowEntry.getKey().getColumnQualifier(cq); rowData.put(cq.toString(), new ByteArrayByteIterator(rowEntry.getValue().get())); } if (count++ == recordcount) { // Done reading the last row. break; } } } catch (TableNotFoundException e) { System.err.println("Error trying to connect to Accumulo table."); e.printStackTrace(); return Status.ERROR; } catch (IOException e) { System.err.println("Error deserializing data from Accumulo."); e.printStackTrace(); return Status.ERROR; } finally { if (null != scanner) { scanner.close(); } } return Status.OK; } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { BatchWriter bw = null; try { bw = getWriter(table); } catch (TableNotFoundException e) { System.err.println("Error opening batch writer to Accumulo table " + table); e.printStackTrace(); return Status.ERROR; } Mutation mutInsert = new Mutation(key.getBytes(UTF_8)); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { mutInsert.put(colFamBytes, entry.getKey().getBytes(UTF_8), entry.getValue().toArray()); } try { bw.addMutation(mutInsert); } catch (MutationsRejectedException e) { System.err.println("Error performing update."); e.printStackTrace(); return Status.ERROR; } return Status.BATCHED_OK; } @Override public Status insert(String t, String key, Map<String, ByteIterator> values) { return update(t, key, values); } @Override public Status delete(String table, String key) { BatchWriter bw; try { bw = getWriter(table); } catch (TableNotFoundException e) { System.err.println("Error trying to connect to Accumulo table."); e.printStackTrace(); return Status.ERROR; } try { deleteRow(table, new Text(key), bw); } catch (TableNotFoundException | MutationsRejectedException e) { System.err.println("Error performing delete."); e.printStackTrace(); return Status.ERROR; } catch (RuntimeException e) { System.err.println("Error performing delete."); e.printStackTrace(); return Status.ERROR; } return Status.OK; } // These functions are adapted from RowOperations.java: private void deleteRow(String table, Text row, BatchWriter bw) throws MutationsRejectedException, TableNotFoundException { // TODO Use a batchDeleter instead deleteRow(getRow(table, row, null), bw); } /** * Deletes a row, given a Scanner of JUST that row. */ private void deleteRow(Scanner scanner, BatchWriter bw) throws MutationsRejectedException { Mutation deleter = null; // iterate through the keys final Text row = new Text(); final Text cf = new Text(); final Text cq = new Text(); for (Entry<Key, Value> entry : scanner) { // create a mutation for the row if (deleter == null) { entry.getKey().getRow(row); deleter = new Mutation(row); } entry.getKey().getColumnFamily(cf); entry.getKey().getColumnQualifier(cq); // the remove function adds the key with the delete flag set to true deleter.putDelete(cf, cq); } bw.addMutation(deleter); } }
12,939
33.691689
100
java
null
NearPMSW-main/baseline/logging/YCSB2/arangodb/src/main/java/site/ycsb/db/arangodb/package-info.java
/** * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="https://www.arangodb.com/">ArangoDB</a>. */ package site.ycsb.db.arangodb;
773
32.652174
73
java
null
NearPMSW-main/baseline/logging/YCSB2/arangodb/src/main/java/site/ycsb/db/arangodb/ArangoDBClient.java
/** * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.arangodb; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Vector; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.arangodb.ArangoCursor; import com.arangodb.ArangoDB; import com.arangodb.ArangoDBException; import com.arangodb.Protocol; import com.arangodb.entity.BaseDocument; import com.arangodb.model.DocumentCreateOptions; import com.arangodb.model.TransactionOptions; import com.arangodb.util.MapBuilder; import com.arangodb.velocypack.VPackBuilder; import com.arangodb.velocypack.VPackSlice; import com.arangodb.velocypack.ValueType; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; /** * ArangoDB binding for YCSB framework using the ArangoDB Inc. <a * href="https://github.com/arangodb/arangodb-java-driver">driver</a> * <p> * See the <code>README.md</code> for configuration information. * </p> * * @see <a href="https://github.com/arangodb/arangodb-java-driver">ArangoDB Inc. * driver</a> */ public class ArangoDBClient extends DB { private static Logger logger = LoggerFactory.getLogger(ArangoDBClient.class); /** * Count the number of times initialized to teardown on the last * {@link #cleanup()}. */ private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); /** ArangoDB Driver related, Singleton. */ private ArangoDB arangoDB; private String databaseName = "ycsb"; private String collectionName; private Boolean dropDBBeforeRun; private Boolean waitForSync = false; private Boolean transactionUpdate = false; /** * Initialize any state for this DB. Called once per DB instance; there is * one DB instance per client thread. * * Actually, one client process will share one DB instance here.(Coincide to * mongoDB driver) */ @Override public void init() throws DBException { synchronized (ArangoDBClient.class) { Properties props = getProperties(); collectionName = props.getProperty("table", "usertable"); // Set the DB address String ip = props.getProperty("arangodb.ip", "localhost"); String portStr = props.getProperty("arangodb.port", "8529"); int port = Integer.parseInt(portStr); // Set network protocol String protocolStr = props.getProperty("arangodb.protocol", "VST"); Protocol protocol = Protocol.valueOf(protocolStr); // If clear db before run String dropDBBeforeRunStr = props.getProperty("arangodb.dropDBBeforeRun", "false"); dropDBBeforeRun = Boolean.parseBoolean(dropDBBeforeRunStr); // Set the sync mode String waitForSyncStr = props.getProperty("arangodb.waitForSync", "false"); waitForSync = Boolean.parseBoolean(waitForSyncStr); // Set if transaction for update String transactionUpdateStr = props.getProperty("arangodb.transactionUpdate", "false"); transactionUpdate = Boolean.parseBoolean(transactionUpdateStr); // Init ArangoDB connection try { arangoDB = new ArangoDB.Builder().host(ip).port(port).useProtocol(protocol).build(); } catch (Exception e) { logger.error("Failed to initialize ArangoDB", e); System.exit(-1); } if(INIT_COUNT.getAndIncrement() == 0) { // Init the database if (dropDBBeforeRun) { // Try delete first try { arangoDB.db(databaseName).drop(); } catch (ArangoDBException e) { logger.info("Fail to delete DB: {}", databaseName); } } try { arangoDB.createDatabase(databaseName); logger.info("Database created: " + databaseName); } catch (ArangoDBException e) { logger.error("Failed to create database: {} with ex: {}", databaseName, e.toString()); } try { arangoDB.db(databaseName).createCollection(collectionName); logger.info("Collection created: " + collectionName); } catch (ArangoDBException e) { logger.error("Failed to create collection: {} with ex: {}", collectionName, e.toString()); } logger.info("ArangoDB client connection created to {}:{}", ip, port); // Log the configuration logger.info("Arango Configuration: dropDBBeforeRun: {}; address: {}:{}; databaseName: {};" + " waitForSync: {}; transactionUpdate: {};", dropDBBeforeRun, ip, port, databaseName, waitForSync, transactionUpdate); } } } /** * Cleanup any state for this DB. Called once per DB instance; there is one * DB instance per client thread. * * Actually, one client process will share one DB instance here.(Coincide to * mongoDB driver) */ @Override public void cleanup() throws DBException { if (INIT_COUNT.decrementAndGet() == 0) { arangoDB.shutdown(); arangoDB = null; logger.info("Local cleaned up."); } } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { BaseDocument toInsert = new BaseDocument(key); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { toInsert.addAttribute(entry.getKey(), byteIteratorToString(entry.getValue())); } DocumentCreateOptions options = new DocumentCreateOptions().waitForSync(waitForSync); arangoDB.db(databaseName).collection(table).insertDocument(toInsert, options); return Status.OK; } catch (ArangoDBException e) { logger.error("Exception while trying insert {} {} with ex {}", table, key, e.toString()); } return Status.ERROR; } /** * Read a record from the database. Each field/value pair from the result * will be stored in a HashMap. * * @param table * The name of the table * @param key * The record key of the record to read. * @param fields * The list of fields to read, or null for all of them * @param result * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error or "not found". */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { VPackSlice document = arangoDB.db(databaseName).collection(table).getDocument(key, VPackSlice.class, null); if (!this.fillMap(result, document, fields)) { return Status.ERROR; } return Status.OK; } catch (ArangoDBException e) { logger.error("Exception while trying read {} {} with ex {}", table, key, e.toString()); } return Status.ERROR; } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table * The name of the table * @param key * The record key of the record to write. * @param values * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error. See this class's * description for a discussion of error codes. */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { if (!transactionUpdate) { BaseDocument updateDoc = new BaseDocument(); for (Entry<String, ByteIterator> field : values.entrySet()) { updateDoc.addAttribute(field.getKey(), byteIteratorToString(field.getValue())); } arangoDB.db(databaseName).collection(table).updateDocument(key, updateDoc); return Status.OK; } else { // id for documentHandle String transactionAction = "function (id) {" // use internal database functions + "var db = require('internal').db;" // collection.update(document, data, overwrite, keepNull, waitForSync) + String.format("db._update(id, %s, true, false, %s);}", mapToJson(values), Boolean.toString(waitForSync).toLowerCase()); TransactionOptions options = new TransactionOptions(); options.writeCollections(table); options.params(createDocumentHandle(table, key)); arangoDB.db(databaseName).transaction(transactionAction, Void.class, options); return Status.OK; } } catch (ArangoDBException e) { logger.error("Exception while trying update {} {} with ex {}", table, key, e.toString()); } return Status.ERROR; } /** * Delete a record from the database. * * @param table * The name of the table * @param key * The record key of the record to delete. * @return Zero on success, a non-zero error code on error. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status delete(String table, String key) { try { arangoDB.db(databaseName).collection(table).deleteDocument(key); return Status.OK; } catch (ArangoDBException e) { logger.error("Exception while trying delete {} {} with ex {}", table, key, e.toString()); } return Status.ERROR; } /** * Perform a range scan for a set of records in the database. Each * field/value pair from the result will be stored in a HashMap. * * @param table * The name of the table * @param startkey * The record key of the first record to read. * @param recordcount * The number of records to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one record * @return Zero on success, a non-zero error code on error. See the * {@link DB} class's description for a discussion of error codes. */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { ArangoCursor<VPackSlice> cursor = null; try { String aqlQuery = String.format( "FOR target IN %s FILTER target._key >= @key SORT target._key ASC LIMIT %d RETURN %s ", table, recordcount, constructReturnForAQL(fields, "target")); Map<String, Object> bindVars = new MapBuilder().put("key", startkey).get(); cursor = arangoDB.db(databaseName).query(aqlQuery, bindVars, null, VPackSlice.class); while (cursor.hasNext()) { VPackSlice aDocument = cursor.next(); HashMap<String, ByteIterator> aMap = new HashMap<String, ByteIterator>(aDocument.size()); if (!this.fillMap(aMap, aDocument)) { return Status.ERROR; } result.add(aMap); } return Status.OK; } catch (Exception e) { logger.error("Exception while trying scan {} {} {} with ex {}", table, startkey, recordcount, e.toString()); } finally { if (cursor != null) { try { cursor.close(); } catch (IOException e) { logger.error("Fail to close cursor", e); } } } return Status.ERROR; } private String createDocumentHandle(String collection, String documentKey) throws ArangoDBException { validateCollectionName(collection); return collection + "/" + documentKey; } private void validateCollectionName(String name) throws ArangoDBException { if (name.indexOf('/') != -1) { throw new ArangoDBException("does not allow '/' in name."); } } private String constructReturnForAQL(Set<String> fields, String targetName) { // Construct the AQL query string. String resultDes = targetName; if (fields != null && fields.size() != 0) { StringBuilder builder = new StringBuilder("{"); for (String field : fields) { builder.append(String.format("\n\"%s\" : %s.%s,", field, targetName, field)); } //Replace last ',' to newline. builder.setCharAt(builder.length() - 1, '\n'); builder.append("}"); resultDes = builder.toString(); } return resultDes; } private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlice document) { return fillMap(resultMap, document, null); } /** * Fills the map with the properties from the BaseDocument. * * @param resultMap * The map to fill/ * @param document * The record to read from * @param fields * The list of fields to read, or null for all of them * @return isSuccess */ private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlice document, Set<String> fields) { if (fields == null || fields.size() == 0) { for (Iterator<Entry<String, VPackSlice>> iterator = document.objectIterator(); iterator.hasNext();) { Entry<String, VPackSlice> next = iterator.next(); VPackSlice value = next.getValue(); if (value.isString()) { resultMap.put(next.getKey(), stringToByteIterator(value.getAsString())); } else if (!value.isCustom()) { logger.error("Error! Not the format expected! Actually is {}", value.getClass().getName()); return false; } } } else { for (String field : fields) { VPackSlice value = document.get(field); if (value.isString()) { resultMap.put(field, stringToByteIterator(value.getAsString())); } else if (!value.isCustom()) { logger.error("Error! Not the format expected! Actually is {}", value.getClass().getName()); return false; } } } return true; } private String byteIteratorToString(ByteIterator byteIter) { return new String(byteIter.toArray()); } private ByteIterator stringToByteIterator(String content) { return new StringByteIterator(content); } private String mapToJson(Map<String, ByteIterator> values) { VPackBuilder builder = new VPackBuilder().add(ValueType.OBJECT); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { builder.add(entry.getKey(), byteIteratorToString(entry.getValue())); } builder.close(); return arangoDB.util().deserialize(builder.slice(), String.class); } }
15,726
35.405093
114
java
null
NearPMSW-main/baseline/logging/YCSB2/cloudspanner/src/main/java/site/ycsb/db/cloudspanner/package-info.java
/* * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for Google's <a href="https://cloud.google.com/spanner/"> * Cloud Spanner</a>. */ package site.ycsb.db.cloudspanner;
801
33.869565
77
java
null
NearPMSW-main/baseline/logging/YCSB2/cloudspanner/src/main/java/site/ycsb/db/cloudspanner/CloudSpannerClient.java
/** * Copyright (c) 2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.cloudspanner; import com.google.common.base.Joiner; import com.google.cloud.spanner.DatabaseId; import com.google.cloud.spanner.DatabaseClient; import com.google.cloud.spanner.Key; import com.google.cloud.spanner.KeySet; import com.google.cloud.spanner.KeyRange; import com.google.cloud.spanner.Mutation; import com.google.cloud.spanner.Options; import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.SessionPoolOptions; import com.google.cloud.spanner.Spanner; import com.google.cloud.spanner.SpannerOptions; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Struct; import com.google.cloud.spanner.StructReader; import com.google.cloud.spanner.TimestampBound; import site.ycsb.ByteIterator; import site.ycsb.Client; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; import java.util.concurrent.TimeUnit; /** * YCSB Client for Google's Cloud Spanner. */ public class CloudSpannerClient extends DB { /** * The names of properties which can be specified in the config files and flags. */ public static final class CloudSpannerProperties { private CloudSpannerProperties() {} /** * The Cloud Spanner database name to use when running the YCSB benchmark, e.g. 'ycsb-database'. */ static final String DATABASE = "cloudspanner.database"; /** * The Cloud Spanner instance ID to use when running the YCSB benchmark, e.g. 'ycsb-instance'. */ static final String INSTANCE = "cloudspanner.instance"; /** * Choose between 'read' and 'query'. Affects both read() and scan() operations. */ static final String READ_MODE = "cloudspanner.readmode"; /** * The number of inserts to batch during the bulk loading phase. The default value is 1, which means no batching * is done. Recommended value during data load is 1000. */ static final String BATCH_INSERTS = "cloudspanner.batchinserts"; /** * Number of seconds we allow reads to be stale for. Set to 0 for strong reads (default). * For performance gains, this should be set to 10 seconds. */ static final String BOUNDED_STALENESS = "cloudspanner.boundedstaleness"; // The properties below usually do not need to be set explicitly. /** * The Cloud Spanner project ID to use when running the YCSB benchmark, e.g. 'myproject'. This is not strictly * necessary and can often be inferred from the environment. */ static final String PROJECT = "cloudspanner.project"; /** * The Cloud Spanner host name to use in the YCSB run. */ static final String HOST = "cloudspanner.host"; /** * Number of Cloud Spanner client channels to use. It's recommended to leave this to be the default value. */ static final String NUM_CHANNELS = "cloudspanner.channels"; } private static int fieldCount; private static boolean queriesForReads; private static int batchInserts; private static TimestampBound timestampBound; private static String standardQuery; private static String standardScan; private static final ArrayList<String> STANDARD_FIELDS = new ArrayList<>(); private static final String PRIMARY_KEY_COLUMN = "id"; private static final Logger LOGGER = Logger.getLogger(CloudSpannerClient.class.getName()); // Static lock for the class. private static final Object CLASS_LOCK = new Object(); // Single Spanner client per process. private static Spanner spanner = null; // Single database client per process. private static DatabaseClient dbClient = null; // Buffered mutations on a per object/thread basis for batch inserts. // Note that we have a separate CloudSpannerClient object per thread. private final ArrayList<Mutation> bufferedMutations = new ArrayList<>(); private static void constructStandardQueriesAndFields(Properties properties) { String table = properties.getProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT); final String fieldprefix = properties.getProperty(CoreWorkload.FIELD_NAME_PREFIX, CoreWorkload.FIELD_NAME_PREFIX_DEFAULT); standardQuery = new StringBuilder() .append("SELECT * FROM ").append(table).append(" WHERE id=@key").toString(); standardScan = new StringBuilder() .append("SELECT * FROM ").append(table).append(" WHERE id>=@startKey LIMIT @count").toString(); for (int i = 0; i < fieldCount; i++) { STANDARD_FIELDS.add(fieldprefix + i); } } private static Spanner getSpanner(Properties properties, String host, String project) { if (spanner != null) { return spanner; } String numChannels = properties.getProperty(CloudSpannerProperties.NUM_CHANNELS); int numThreads = Integer.parseInt(properties.getProperty(Client.THREAD_COUNT_PROPERTY, "1")); SpannerOptions.Builder optionsBuilder = SpannerOptions.newBuilder() .setSessionPoolOption(SessionPoolOptions.newBuilder() .setMinSessions(numThreads) // Since we have no read-write transactions, we can set the write session fraction to 0. .setWriteSessionsFraction(0) .build()); if (host != null) { optionsBuilder.setHost(host); } if (project != null) { optionsBuilder.setProjectId(project); } if (numChannels != null) { optionsBuilder.setNumChannels(Integer.parseInt(numChannels)); } spanner = optionsBuilder.build().getService(); Runtime.getRuntime().addShutdownHook(new Thread("spannerShutdown") { @Override public void run() { spanner.close(); } }); return spanner; } @Override public void init() throws DBException { synchronized (CLASS_LOCK) { if (dbClient != null) { return; } Properties properties = getProperties(); String host = properties.getProperty(CloudSpannerProperties.HOST); String project = properties.getProperty(CloudSpannerProperties.PROJECT); String instance = properties.getProperty(CloudSpannerProperties.INSTANCE, "ycsb-instance"); String database = properties.getProperty(CloudSpannerProperties.DATABASE, "ycsb-database"); fieldCount = Integer.parseInt(properties.getProperty( CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT)); queriesForReads = properties.getProperty(CloudSpannerProperties.READ_MODE, "query").equals("query"); batchInserts = Integer.parseInt(properties.getProperty(CloudSpannerProperties.BATCH_INSERTS, "1")); constructStandardQueriesAndFields(properties); int boundedStalenessSeconds = Integer.parseInt(properties.getProperty( CloudSpannerProperties.BOUNDED_STALENESS, "0")); timestampBound = (boundedStalenessSeconds <= 0) ? TimestampBound.strong() : TimestampBound.ofMaxStaleness(boundedStalenessSeconds, TimeUnit.SECONDS); try { spanner = getSpanner(properties, host, project); if (project == null) { project = spanner.getOptions().getProjectId(); } dbClient = spanner.getDatabaseClient(DatabaseId.of(project, instance, database)); } catch (Exception e) { LOGGER.log(Level.SEVERE, "init()", e); throw new DBException(e); } LOGGER.log(Level.INFO, new StringBuilder() .append("\nHost: ").append(spanner.getOptions().getHost()) .append("\nProject: ").append(project) .append("\nInstance: ").append(instance) .append("\nDatabase: ").append(database) .append("\nUsing queries for reads: ").append(queriesForReads) .append("\nBatching inserts: ").append(batchInserts) .append("\nBounded staleness seconds: ").append(boundedStalenessSeconds) .toString()); } } private Status readUsingQuery( String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Statement query; Iterable<String> columns = fields == null ? STANDARD_FIELDS : fields; if (fields == null || fields.size() == fieldCount) { query = Statement.newBuilder(standardQuery).bind("key").to(key).build(); } else { Joiner joiner = Joiner.on(','); query = Statement.newBuilder("SELECT ") .append(joiner.join(fields)) .append(" FROM ") .append(table) .append(" WHERE id=@key") .bind("key").to(key) .build(); } try (ResultSet resultSet = dbClient.singleUse(timestampBound).executeQuery(query)) { resultSet.next(); decodeStruct(columns, resultSet, result); if (resultSet.next()) { throw new Exception("Expected exactly one row for each read."); } return Status.OK; } catch (Exception e) { LOGGER.log(Level.INFO, "readUsingQuery()", e); return Status.ERROR; } } @Override public Status read( String table, String key, Set<String> fields, Map<String, ByteIterator> result) { if (queriesForReads) { return readUsingQuery(table, key, fields, result); } Iterable<String> columns = fields == null ? STANDARD_FIELDS : fields; try { Struct row = dbClient.singleUse(timestampBound).readRow(table, Key.of(key), columns); decodeStruct(columns, row, result); return Status.OK; } catch (Exception e) { LOGGER.log(Level.INFO, "read()", e); return Status.ERROR; } } private Status scanUsingQuery( String table, String startKey, int recordCount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { Iterable<String> columns = fields == null ? STANDARD_FIELDS : fields; Statement query; if (fields == null || fields.size() == fieldCount) { query = Statement.newBuilder(standardScan).bind("startKey").to(startKey).bind("count").to(recordCount).build(); } else { Joiner joiner = Joiner.on(','); query = Statement.newBuilder("SELECT ") .append(joiner.join(fields)) .append(" FROM ") .append(table) .append(" WHERE id>=@startKey LIMIT @count") .bind("startKey").to(startKey) .bind("count").to(recordCount) .build(); } try (ResultSet resultSet = dbClient.singleUse(timestampBound).executeQuery(query)) { while (resultSet.next()) { HashMap<String, ByteIterator> row = new HashMap<>(); decodeStruct(columns, resultSet, row); result.add(row); } return Status.OK; } catch (Exception e) { LOGGER.log(Level.INFO, "scanUsingQuery()", e); return Status.ERROR; } } @Override public Status scan( String table, String startKey, int recordCount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { if (queriesForReads) { return scanUsingQuery(table, startKey, recordCount, fields, result); } Iterable<String> columns = fields == null ? STANDARD_FIELDS : fields; KeySet keySet = KeySet.newBuilder().addRange(KeyRange.closedClosed(Key.of(startKey), Key.of())).build(); try (ResultSet resultSet = dbClient.singleUse(timestampBound) .read(table, keySet, columns, Options.limit(recordCount))) { while (resultSet.next()) { HashMap<String, ByteIterator> row = new HashMap<>(); decodeStruct(columns, resultSet, row); result.add(row); } return Status.OK; } catch (Exception e) { LOGGER.log(Level.INFO, "scan()", e); return Status.ERROR; } } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { Mutation.WriteBuilder m = Mutation.newInsertOrUpdateBuilder(table); m.set(PRIMARY_KEY_COLUMN).to(key); for (Map.Entry<String, ByteIterator> e : values.entrySet()) { m.set(e.getKey()).to(e.getValue().toString()); } try { dbClient.writeAtLeastOnce(Arrays.asList(m.build())); } catch (Exception e) { LOGGER.log(Level.INFO, "update()", e); return Status.ERROR; } return Status.OK; } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { if (bufferedMutations.size() < batchInserts) { Mutation.WriteBuilder m = Mutation.newInsertOrUpdateBuilder(table); m.set(PRIMARY_KEY_COLUMN).to(key); for (Map.Entry<String, ByteIterator> e : values.entrySet()) { m.set(e.getKey()).to(e.getValue().toString()); } bufferedMutations.add(m.build()); } else { LOGGER.log(Level.INFO, "Limit of cached mutations reached. The given mutation with key " + key + " is ignored. Is this a retry?"); } if (bufferedMutations.size() < batchInserts) { return Status.BATCHED_OK; } try { dbClient.writeAtLeastOnce(bufferedMutations); bufferedMutations.clear(); } catch (Exception e) { LOGGER.log(Level.INFO, "insert()", e); return Status.ERROR; } return Status.OK; } @Override public void cleanup() { try { if (bufferedMutations.size() > 0) { dbClient.writeAtLeastOnce(bufferedMutations); bufferedMutations.clear(); } } catch (Exception e) { LOGGER.log(Level.INFO, "cleanup()", e); } } @Override public Status delete(String table, String key) { try { dbClient.writeAtLeastOnce(Arrays.asList(Mutation.delete(table, Key.of(key)))); } catch (Exception e) { LOGGER.log(Level.INFO, "delete()", e); return Status.ERROR; } return Status.OK; } private static void decodeStruct( Iterable<String> columns, StructReader structReader, Map<String, ByteIterator> result) { for (String col : columns) { result.put(col, new StringByteIterator(structReader.getString(col))); } } }
14,857
36.145
117
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/test/java/site/ycsb/db/ignite/IgniteClientTestBase.java
/** * Copyright (c) 2013-2018 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. * <p> */ package site.ycsb.db.ignite; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.apache.ignite.Ignite; import org.junit.After; import org.junit.AfterClass; import org.junit.Test; import java.util.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; /** * Common test class. */ public class IgniteClientTestBase { protected static final String DEFAULT_CACHE_NAME = "usertable"; /** */ protected static Ignite cluster; /** */ protected DB client; /** * */ @After public void tearDown() throws Exception { client.cleanup(); } /** * */ @AfterClass public static void afterClass() { cluster.close(); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } @Test public void scanNotImplemented() { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2"); final Status status = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(status, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Vector<HashMap<String, ByteIterator>> results = new Vector<>(); final Status scan = client.scan(DEFAULT_CACHE_NAME, key, 1, null, results); assertThat(scan, is(Status.NOT_IMPLEMENTED)); } }
2,236
25.630952
111
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/test/java/site/ycsb/db/ignite/IgniteClientTest.java
/** * Copyright (c) 2018 YCSB contributors All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.ignite; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.measurements.Measurements; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.Ignition; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.logger.log4j2.Log4J2Logger; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import java.util.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.is; /** * Integration tests for the Ignite client */ public class IgniteClientTest extends IgniteClientTestBase { private final static String HOST = "127.0.0.1"; private final static String PORTS = "47500..47509"; private final static String SERVER_NODE_NAME = "YCSB Server Node"; private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @BeforeClass public static void beforeTest() throws IgniteCheckedException { IgniteConfiguration igcfg = new IgniteConfiguration(); igcfg.setIgniteInstanceName(SERVER_NODE_NAME); igcfg.setClientMode(false); TcpDiscoverySpi disco = new TcpDiscoverySpi(); Collection<String> adders = new LinkedHashSet<>(); adders.add(HOST + ":" + PORTS); ((TcpDiscoveryVmIpFinder) ipFinder).setAddresses(adders); disco.setIpFinder(ipFinder); igcfg.setDiscoverySpi(disco); igcfg.setNetworkTimeout(2000); CacheConfiguration ccfg = new CacheConfiguration().setName(DEFAULT_CACHE_NAME); igcfg.setCacheConfiguration(ccfg); Log4J2Logger logger = new Log4J2Logger(IgniteClientTest.class.getClassLoader().getResource("log4j2.xml")); igcfg.setGridLogger(logger); cluster = Ignition.start(igcfg); cluster.active(); } @Before public void setUp() throws Exception { Properties p = new Properties(); p.setProperty("hosts", HOST); p.setProperty("ports", PORTS); Measurements.setProperties(p); client = new IgniteClient(); client.setProperties(p); client.init(); } @Test public void testInsert() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2"); final Status status = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(status, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); } @Test public void testDelete() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key1 = "key1"; final Map<String, String> input1 = new HashMap<>(); input1.put("field0", "value1"); input1.put("field1", "value2"); final Status status1 = client.insert(DEFAULT_CACHE_NAME, key1, StringByteIterator.getByteIteratorMap(input1)); assertThat(status1, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final String key2 = "key2"; final Map<String, String> input2 = new HashMap<>(); input2.put("field0", "value1"); input2.put("field1", "value2"); final Status status2 = client.insert(DEFAULT_CACHE_NAME, key2, StringByteIterator.getByteIteratorMap(input2)); assertThat(status2, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(2)); final Status status3 = client.delete(DEFAULT_CACHE_NAME, key2); assertThat(status3, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); } @Test public void testRead() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); fld.add("field0"); fld.add("field1"); fld.add("field3"); final HashMap<String, ByteIterator> result = new HashMap<>(); final Status sGet = client.read(DEFAULT_CACHE_NAME, key, fld, result); assertThat(sGet, is(Status.OK)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2A")); } @Test public void testReadAllFields() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); final HashMap<String, ByteIterator> result1 = new HashMap<>(); final Status sGet = client.read(DEFAULT_CACHE_NAME, key, fld, result1); assertThat(sGet, is(Status.OK)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result1.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2A")); } @Test public void testReadNotPresent() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); final String newKey = "newKey"; final HashMap<String, ByteIterator> result1 = new HashMap<>(); final Status sGet = client.read(DEFAULT_CACHE_NAME, newKey, fld, result1); assertThat(sGet, is(Status.NOT_FOUND)); } }
7,651
35.966184
114
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/test/java/site/ycsb/db/ignite/IgniteSqlClientTest.java
/** * Copyright (c) 2018 YCSB contributors All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.ignite; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.measurements.Measurements; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.Ignition; import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.logger.log4j2.Log4J2Logger; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.is; /** * Integration tests for the Ignite client */ public class IgniteSqlClientTest extends IgniteClientTestBase { private static final String TABLE_NAME = "usertable"; private final static String HOST = "127.0.0.1"; private final static String PORTS = "47500..47509"; private final static String SERVER_NODE_NAME = "YCSB Server Node"; private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** * */ @BeforeClass public static void beforeTest() throws IgniteCheckedException { IgniteConfiguration igcfg = new IgniteConfiguration(); igcfg.setIgniteInstanceName(SERVER_NODE_NAME); igcfg.setClientMode(false); TcpDiscoverySpi disco = new TcpDiscoverySpi(); Collection<String> adders = new LinkedHashSet<>(); adders.add(HOST + ":" + PORTS); QueryEntity qe = new QueryEntity("java.lang.String", "UserTableType") .addQueryField("ycsb_key", "java.lang.String", null) .addQueryField("field0", "java.lang.String", null) .addQueryField("field1", "java.lang.String", null) .addQueryField("field2", "java.lang.String", null) .addQueryField("field3", "java.lang.String", null) .addQueryField("field4", "java.lang.String", null) .addQueryField("field5", "java.lang.String", null) .addQueryField("field6", "java.lang.String", null) .addQueryField("field7", "java.lang.String", null) .addQueryField("field8", "java.lang.String", null) .addQueryField("field9", "java.lang.String", null) .setKeyFieldName("ycsb_key"); qe.setTableName("usertable"); CacheConfiguration ccfg = new CacheConfiguration().setQueryEntities(Collections.singleton(qe)) .setName(DEFAULT_CACHE_NAME); igcfg.setCacheConfiguration(ccfg); ((TcpDiscoveryVmIpFinder) ipFinder).setAddresses(adders); disco.setIpFinder(ipFinder); igcfg.setDiscoverySpi(disco); igcfg.setNetworkTimeout(2000); Log4J2Logger logger = new Log4J2Logger(IgniteSqlClientTest.class.getClassLoader().getResource("log4j2.xml")); igcfg.setGridLogger(logger); cluster = Ignition.start(igcfg); cluster.active(); } @Before public void setUp() throws Exception { Properties p = new Properties(); p.setProperty("hosts", HOST); p.setProperty("ports", PORTS); Measurements.setProperties(p); client = new IgniteSqlClient(); client.setProperties(p); client.init(); } @Test public void testInsert() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2"); final Status status = client.insert(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(status, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); } @Test public void testDelete() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key1 = "key1"; final Map<String, String> input1 = new HashMap<>(); input1.put("field0", "value1"); input1.put("field1", "value2"); final Status status1 = client.insert(TABLE_NAME, key1, StringByteIterator.getByteIteratorMap(input1)); assertThat(status1, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final String key2 = "key2"; final Map<String, String> input2 = new HashMap<>(); input2.put("field0", "value1"); input2.put("field1", "value2"); final Status status2 = client.insert(TABLE_NAME, key2, StringByteIterator.getByteIteratorMap(input2)); assertThat(status2, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(2)); final Status status3 = client.delete(TABLE_NAME, key2); assertThat(status3, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); } @Test public void testRead() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); fld.add("field0"); fld.add("field1"); fld.add("field3"); final HashMap<String, ByteIterator> result = new HashMap<>(); final Status sGet = client.read(TABLE_NAME, key, fld, result); assertThat(sGet, is(Status.OK)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2A")); } @Test public void testUpdate() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); client.insert(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); input.put("field1", "value2B"); input.put("field4", "value4A"); final Status sUpd = client.update(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sUpd, is(Status.OK)); final Set<String> fld = new TreeSet<>(); fld.add("field0"); fld.add("field1"); fld.add("field3"); fld.add("field4"); final HashMap<String, ByteIterator> result = new HashMap<>(); final Status sGet = client.read(TABLE_NAME, key, fld, result); assertThat(sGet, is(Status.OK)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2B")); assertThat(strResult, hasEntry("field4", "value4A")); } @Test public void testConcurrentUpdate() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); client.insert(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); input.put("field1", "value2B"); input.put("field4", "value4A"); ExecutorService exec = Executors.newCachedThreadPool(); final AtomicLong l = new AtomicLong(0); final Boolean[] updError = {false}; Runnable task = new Runnable() { @Override public void run() { for (int i = 0; i < 100; ++i) { input.put("field1", "value2B_" + l.incrementAndGet()); final Status sUpd = client.update(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); if (!sUpd.isOk()) { updError[0] = true; break; } } } }; for (int i = 0; i < 32; ++i) { exec.execute(task); } exec.awaitTermination(60, TimeUnit.SECONDS); exec.shutdownNow(); assertThat(updError[0], is(false)); } @Test public void testReadAllFields() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(DEFAULT_CACHE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); final HashMap<String, ByteIterator> result1 = new HashMap<>(); final Status sGet = client.read(TABLE_NAME, key, fld, result1); assertThat(sGet, is(Status.OK)); final HashMap<String, String> strResult = new HashMap<String, String>(); for (final Map.Entry<String, ByteIterator> e : result1.entrySet()) { if (e.getValue() != null) { strResult.put(e.getKey(), e.getValue().toString()); } } assertThat(strResult, hasEntry("field0", "value1")); assertThat(strResult, hasEntry("field1", "value2A")); } @Test public void testReadNotPresent() throws Exception { cluster.cache(DEFAULT_CACHE_NAME).clear(); final String key = "key"; final Map<String, String> input = new HashMap<>(); input.put("field0", "value1"); input.put("field1", "value2A"); input.put("field3", null); final Status sPut = client.insert(TABLE_NAME, key, StringByteIterator.getByteIteratorMap(input)); assertThat(sPut, is(Status.OK)); assertThat(cluster.cache(DEFAULT_CACHE_NAME).size(), is(1)); final Set<String> fld = new TreeSet<>(); final String newKey = "newKey"; final HashMap<String, ByteIterator> result1 = new HashMap<>(); final Status sGet = client.read(TABLE_NAME, newKey, fld, result1); assertThat(sGet, is(Status.NOT_FOUND)); } }
11,331
35.204473
113
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/main/java/site/ycsb/db/ignite/package-info.java
/* * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://ignite.apache.org/">Ignite</a>. * Naive implementation. */ package site.ycsb.db.ignite;
788
31.875
71
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/main/java/site/ycsb/db/ignite/IgniteAbstractClient.java
/** * Copyright (c) 2013-2018 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. * <p> */ package site.ycsb.db.ignite; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import java.util.Collection; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Set; import java.util.Vector; import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.logger.log4j2.Log4J2Logger; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * Ignite abstract client. * <p> * See {@code ignite/README.md} for details. */ public abstract class IgniteAbstractClient extends DB { /** */ protected static Logger log = LogManager.getLogger(IgniteAbstractClient.class); protected static final String DEFAULT_CACHE_NAME = "usertable"; protected static final String HOSTS_PROPERTY = "hosts"; protected static final String PORTS_PROPERTY = "ports"; protected static final String CLIENT_NODE_NAME = "YCSB client node"; protected static final String PORTS_DEFAULTS = "47500..47509"; /** * Count the number of times initialized to teardown on the last * {@link #cleanup()}. */ protected static final AtomicInteger INIT_COUNT = new AtomicInteger(0); /** Ignite cluster. */ protected static Ignite cluster = null; /** Ignite cache to store key-values. */ protected static IgniteCache<String, BinaryObject> cache = null; /** Debug flag. */ protected static boolean debug = false; protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { // Keep track of number of calls to init (for later cleanup) INIT_COUNT.incrementAndGet(); // Synchronized so that we only have a single // cluster/session instance for all the threads. synchronized (INIT_COUNT) { // Check if the cluster has already been initialized if (cluster != null) { return; } try { debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); IgniteConfiguration igcfg = new IgniteConfiguration(); igcfg.setIgniteInstanceName(CLIENT_NODE_NAME); String host = getProperties().getProperty(HOSTS_PROPERTY); if (host == null) { throw new DBException(String.format( "Required property \"%s\" missing for Ignite Cluster", HOSTS_PROPERTY)); } String ports = getProperties().getProperty(PORTS_PROPERTY, PORTS_DEFAULTS); if (ports == null) { throw new DBException(String.format( "Required property \"%s\" missing for Ignite Cluster", PORTS_PROPERTY)); } System.setProperty("IGNITE_QUIET", "false"); TcpDiscoverySpi disco = new TcpDiscoverySpi(); Collection<String> addrs = new LinkedHashSet<>(); addrs.add(host + ":" + ports); ((TcpDiscoveryVmIpFinder) ipFinder).setAddresses(addrs); disco.setIpFinder(ipFinder); igcfg.setDiscoverySpi(disco); igcfg.setNetworkTimeout(2000); igcfg.setClientMode(true); Log4J2Logger logger = new Log4J2Logger(this.getClass().getClassLoader().getResource("log4j2.xml")); igcfg.setGridLogger(logger); log.info("Start Ignite client node."); cluster = Ignition.start(igcfg); log.info("Activate Ignite cluster."); cluster.active(true); cache = cluster.cache(DEFAULT_CACHE_NAME).withKeepBinary(); if(cache == null) { throw new DBException(new IgniteCheckedException("Failed to find cache " + DEFAULT_CACHE_NAME)); } } catch (Exception e) { throw new DBException(e); } } // synchronized } /** * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ @Override public void cleanup() throws DBException { synchronized (INIT_COUNT) { final int curInitCount = INIT_COUNT.decrementAndGet(); if (curInitCount <= 0) { cluster.close(); cluster = null; } if (curInitCount < 0) { // This should never happen. throw new DBException( String.format("initCount is negative: %d", curInitCount)); } } } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { return Status.NOT_IMPLEMENTED; } }
5,765
31.761364
107
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/main/java/site/ycsb/db/ignite/IgniteClient.java
/** * Copyright (c) 2013-2018 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. * <p> */ package site.ycsb.db.ignite; import site.ycsb.*; import org.apache.ignite.binary.BinaryField; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectBuilder; import org.apache.ignite.binary.BinaryType; import org.apache.ignite.cache.CacheEntryProcessor; import org.apache.ignite.internal.util.typedef.F; import javax.cache.processor.EntryProcessorException; import javax.cache.processor.MutableEntry; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * Ignite client. * <p> * See {@code ignite/README.md} for details. */ public class IgniteClient extends IgniteAbstractClient { /** */ private static Logger log = LogManager.getLogger(IgniteClient.class); /** Cached binary type. */ private BinaryType binType = null; /** Cached binary type's fields. */ private final ConcurrentHashMap<String, BinaryField> fieldsCache = new ConcurrentHashMap<>(); /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table The name of the table * @param key The record key of the record to read. * @param fields The list of fields to read, or null for all of them * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { BinaryObject po = cache.get(key); if (po == null) { return Status.NOT_FOUND; } if (binType == null) { binType = po.type(); } for (String s : F.isEmpty(fields) ? binType.fieldNames() : fields) { BinaryField bfld = fieldsCache.get(s); if (bfld == null) { bfld = binType.field(s); fieldsCache.put(s, bfld); } String val = bfld.value(po); if (val != null) { result.put(s, new StringByteIterator(val)); } if (debug) { log.info("table:{" + table + "}, key:{" + key + "}" + ", fields:{" + fields + "}"); log.info("fields in po{" + binType.fieldNames() + "}"); log.info("result {" + result + "}"); } } return Status.OK; } catch (Exception e) { log.error(String.format("Error reading key: %s", key), e); return Status.ERROR; } } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table The name of the table * @param key The record key of the record to write. * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { cache.invoke(key, new Updater(values)); return Status.OK; } catch (Exception e) { log.error(String.format("Error updating key: %s", key), e); return Status.ERROR; } } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table The name of the table * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { BinaryObjectBuilder bob = cluster.binary().builder("CustomType"); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { bob.setField(entry.getKey(), entry.getValue().toString()); if (debug) { log.info(entry.getKey() + ":" + entry.getValue()); } } BinaryObject bo = bob.build(); if (table.equals(DEFAULT_CACHE_NAME)) { cache.put(key, bo); } else { throw new UnsupportedOperationException("Unexpected table name: " + table); } return Status.OK; } catch (Exception e) { log.error(String.format("Error inserting key: %s", key), e); return Status.ERROR; } } /** * Delete a record from the database. * * @param table The name of the table * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ @Override public Status delete(String table, String key) { try { cache.remove(key); return Status.OK; } catch (Exception e) { log.error(String.format("Error deleting key: %s ", key), e); } return Status.ERROR; } /** * Entry processor to update values. */ public static class Updater implements CacheEntryProcessor<String, BinaryObject, Object> { private String[] flds; private String[] vals; /** * @param values Updated fields. */ Updater(Map<String, ByteIterator> values) { flds = new String[values.size()]; vals = new String[values.size()]; int idx = 0; for (Map.Entry<String, ByteIterator> e : values.entrySet()) { flds[idx] = e.getKey(); vals[idx] = e.getValue().toString(); ++idx; } } /** * {@inheritDoc} */ @Override public Object process(MutableEntry<String, BinaryObject> mutableEntry, Object... objects) throws EntryProcessorException { BinaryObjectBuilder bob = mutableEntry.getValue().toBuilder(); for (int i = 0; i < flds.length; ++i) { bob.setField(flds[i], vals[i]); } mutableEntry.setValue(bob.build()); return null; } } }
6,725
28.116883
95
java
null
NearPMSW-main/baseline/logging/YCSB2/ignite/src/main/java/site/ycsb/db/ignite/IgniteSqlClient.java
/** * Copyright (c) 2013-2018 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. * <p> */ package site.ycsb.db.ignite; import site.ycsb.*; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.util.typedef.F; import javax.cache.CacheException; import java.util.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * Ignite client. * <p> * See {@code ignite/README.md} for details. */ public class IgniteSqlClient extends IgniteAbstractClient { /** */ private static Logger log = LogManager.getLogger(IgniteSqlClient.class); /** */ private static final String PRIMARY_KEY = "YCSB_KEY"; /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table The name of the table * @param key The record key of the record to read. * @param fields The list of fields to read, or null for all of them * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { StringBuilder sb = new StringBuilder("SELECT * FROM ").append(table) .append(" WHERE ").append(PRIMARY_KEY).append("=?"); SqlFieldsQuery qry = new SqlFieldsQuery(sb.toString()); qry.setArgs(key); FieldsQueryCursor<List<?>> cur = cache.query(qry); Iterator<List<?>> it = cur.iterator(); if (!it.hasNext()) { return Status.NOT_FOUND; } String[] colNames = new String[cur.getColumnsCount()]; for (int i = 0; i < colNames.length; ++i) { String colName = cur.getFieldName(i); if (F.isEmpty(fields)) { colNames[i] = colName.toLowerCase(); } else { for (String f : fields) { if (f.equalsIgnoreCase(colName)) { colNames[i] = f; } } } } while (it.hasNext()) { List<?> row = it.next(); for (int i = 0; i < colNames.length; ++i) { if (colNames[i] != null) { result.put(colNames[i], new StringByteIterator((String) row.get(i))); } } } return Status.OK; } catch (Exception e) { log.error(String.format("Error in processing read from table: %s", table), e); return Status.ERROR; } } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table The name of the table * @param key The record key of the record to write. * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { while (true) { try { UpdateData updData = new UpdateData(key, values); StringBuilder sb = new StringBuilder("UPDATE ").append(table).append(" SET "); for (int i = 0; i < updData.getFields().length; ++i) { sb.append(updData.getFields()[i]).append("=?"); if (i < updData.getFields().length - 1) { sb.append(", "); } } sb.append(" WHERE ").append(PRIMARY_KEY).append("=?"); SqlFieldsQuery qry = new SqlFieldsQuery(sb.toString()); qry.setArgs(updData.getArgs()); cache.query(qry).getAll(); return Status.OK; } catch (CacheException e) { if (!e.getMessage().contains("Failed to update some keys because they had been modified concurrently")) { log.error(String.format("Error in processing update table: %s", table), e); return Status.ERROR; } } catch (Exception e) { log.error(String.format("Error in processing update table: %s", table), e); return Status.ERROR; } } } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table The name of the table * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { InsertData insertData = new InsertData(key, values); StringBuilder sb = new StringBuilder("INSERT INTO ").append(table).append(" (") .append(insertData.getInsertFields()).append(") VALUES (") .append(insertData.getInsertParams()).append(')'); SqlFieldsQuery qry = new SqlFieldsQuery(sb.toString()); qry.setArgs(insertData.getArgs()); cache.query(qry).getAll(); return Status.OK; } catch (Exception e) { log.error(String.format("Error in processing insert to table: %s", table), e); return Status.ERROR; } } /** * Delete a record from the database. * * @param table The name of the table * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ @Override public Status delete(String table, String key) { try { StringBuilder sb = new StringBuilder("DELETE FROM ").append(table) .append(" WHERE ").append(PRIMARY_KEY).append(" = ?"); SqlFieldsQuery qry = new SqlFieldsQuery(sb.toString()); qry.setArgs(key); cache.query(qry).getAll(); return Status.OK; } catch (Exception e) { log.error(String.format("Error in processing read from table: %s", table), e); return Status.ERROR; } } /** * Field and values for insert queries. */ private static class InsertData { private final Object[] args; private final String insertFields; private final String insertParams; /** * @param key Key. * @param values Field values. */ InsertData(String key, Map<String, ByteIterator> values) { args = new String[values.size() + 1]; int idx = 0; args[idx++] = key; StringBuilder sbFields = new StringBuilder(PRIMARY_KEY); StringBuilder sbParams = new StringBuilder("?"); for (Map.Entry<String, ByteIterator> e : values.entrySet()) { args[idx++] = e.getValue().toString(); sbFields.append(',').append(e.getKey()); sbParams.append(", ?"); } insertFields = sbFields.toString(); insertParams = sbParams.toString(); } public Object[] getArgs() { return args; } public String getInsertFields() { return insertFields; } public String getInsertParams() { return insertParams; } } /** * Field and values for update queries. */ private static class UpdateData { private final Object[] args; private final String[] fields; /** * @param key Key. * @param values Field values. */ UpdateData(String key, Map<String, ByteIterator> values) { args = new String[values.size() + 1]; fields = new String[values.size()]; int idx = 0; for (Map.Entry<String, ByteIterator> e : values.entrySet()) { args[idx] = e.getValue().toString(); fields[idx++] = e.getKey(); } args[idx] = key; } public Object[] getArgs() { return args; } public String[] getFields() { return fields; } } }
8,437
29.243728
113
java
null
NearPMSW-main/baseline/logging/YCSB2/couchbase2/src/main/java/site/ycsb/db/couchbase2/package-info.java
/* * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://www.couchbase.com/">Couchbase</a>, new driver. */ package site.ycsb.db.couchbase2;
794
33.565217
86
java
null
NearPMSW-main/baseline/logging/YCSB2/couchbase2/src/main/java/site/ycsb/db/couchbase2/Couchbase2Client.java
/** * Copyright (c) 2016 Yahoo! Inc. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.couchbase2; import com.couchbase.client.core.env.DefaultCoreEnvironment; import com.couchbase.client.core.env.resources.IoPoolShutdownHook; import com.couchbase.client.core.logging.CouchbaseLogger; import com.couchbase.client.core.logging.CouchbaseLoggerFactory; import com.couchbase.client.core.metrics.DefaultLatencyMetricsCollectorConfig; import com.couchbase.client.core.metrics.DefaultMetricsCollectorConfig; import com.couchbase.client.core.metrics.LatencyMetricsCollectorConfig; import com.couchbase.client.core.metrics.MetricsCollectorConfig; import com.couchbase.client.deps.com.fasterxml.jackson.core.JsonFactory; import com.couchbase.client.deps.com.fasterxml.jackson.core.JsonGenerator; import com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode; import com.couchbase.client.deps.com.fasterxml.jackson.databind.node.ObjectNode; import com.couchbase.client.deps.io.netty.channel.DefaultSelectStrategyFactory; import com.couchbase.client.deps.io.netty.channel.EventLoopGroup; import com.couchbase.client.deps.io.netty.channel.SelectStrategy; import com.couchbase.client.deps.io.netty.channel.SelectStrategyFactory; import com.couchbase.client.deps.io.netty.channel.epoll.EpollEventLoopGroup; import com.couchbase.client.deps.io.netty.channel.nio.NioEventLoopGroup; import com.couchbase.client.deps.io.netty.util.IntSupplier; import com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory; import com.couchbase.client.java.Bucket; import com.couchbase.client.java.Cluster; import com.couchbase.client.java.CouchbaseCluster; import com.couchbase.client.java.PersistTo; import com.couchbase.client.java.ReplicateTo; import com.couchbase.client.java.document.Document; import com.couchbase.client.java.document.RawJsonDocument; import com.couchbase.client.java.document.json.JsonArray; import com.couchbase.client.java.document.json.JsonObject; import com.couchbase.client.java.env.CouchbaseEnvironment; import com.couchbase.client.java.env.DefaultCouchbaseEnvironment; import com.couchbase.client.java.error.TemporaryFailureException; import com.couchbase.client.java.query.*; import com.couchbase.client.java.transcoder.JacksonTransformers; import com.couchbase.client.java.util.Blocking; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import rx.Observable; import rx.Subscriber; import rx.functions.Action1; import rx.functions.Func1; import java.io.StringWriter; import java.io.Writer; import java.nio.channels.spi.SelectorProvider; import java.util.*; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.LockSupport; /** * A class that wraps the 2.x Couchbase SDK to be used with YCSB. * * <p> The following options can be passed when using this database client to override the defaults. * * <ul> * <li><b>couchbase.host=127.0.0.1</b> The hostname from one server.</li> * <li><b>couchbase.bucket=default</b> The bucket name to use.</li> * <li><b>couchbase.password=</b> The password of the bucket.</li> * <li><b>couchbase.syncMutationResponse=true</b> If mutations should wait for the response to complete.</li> * <li><b>couchbase.persistTo=0</b> Persistence durability requirement</li> * <li><b>couchbase.replicateTo=0</b> Replication durability requirement</li> * <li><b>couchbase.upsert=false</b> Use upsert instead of insert or replace.</li> * <li><b>couchbase.adhoc=false</b> If set to true, prepared statements are not used.</li> * <li><b>couchbase.kv=true</b> If set to false, mutation operations will also be performed through N1QL.</li> * <li><b>couchbase.maxParallelism=1</b> The server parallelism for all n1ql queries.</li> * <li><b>couchbase.kvEndpoints=1</b> The number of KV sockets to open per server.</li> * <li><b>couchbase.queryEndpoints=5</b> The number of N1QL Query sockets to open per server.</li> * <li><b>couchbase.epoll=false</b> If Epoll instead of NIO should be used (only available for linux.</li> * <li><b>couchbase.boost=3</b> If > 0 trades CPU for higher throughput. N is the number of event loops, ideally * set to the number of physical cores. Setting higher than that will likely degrade performance.</li> * <li><b>couchbase.networkMetricsInterval=0</b> The interval in seconds when latency metrics will be logged.</li> * <li><b>couchbase.runtimeMetricsInterval=0</b> The interval in seconds when runtime metrics will be logged.</li> * <li><b>couchbase.documentExpiry=0</b> Document Expiry is the amount of time until a document expires in * Couchbase.</li> * </ul> */ public class Couchbase2Client extends DB { static { // No need to send the full encoded_plan for this benchmark workload, less network overhead! System.setProperty("com.couchbase.query.encodedPlanEnabled", "false"); } private static final String SEPARATOR = ":"; private static final CouchbaseLogger LOGGER = CouchbaseLoggerFactory.getInstance(Couchbase2Client.class); private static final Object INIT_COORDINATOR = new Object(); private static volatile CouchbaseEnvironment env = null; private Cluster cluster; private Bucket bucket; private String bucketName; private boolean upsert; private PersistTo persistTo; private ReplicateTo replicateTo; private boolean syncMutResponse; private boolean epoll; private long kvTimeout; private boolean adhoc; private boolean kv; private int maxParallelism; private String host; private int kvEndpoints; private int queryEndpoints; private int boost; private int networkMetricsInterval; private int runtimeMetricsInterval; private String scanAllQuery; private int documentExpiry; @Override public void init() throws DBException { Properties props = getProperties(); host = props.getProperty("couchbase.host", "127.0.0.1"); bucketName = props.getProperty("couchbase.bucket", "default"); String bucketPassword = props.getProperty("couchbase.password", ""); upsert = props.getProperty("couchbase.upsert", "false").equals("true"); persistTo = parsePersistTo(props.getProperty("couchbase.persistTo", "0")); replicateTo = parseReplicateTo(props.getProperty("couchbase.replicateTo", "0")); syncMutResponse = props.getProperty("couchbase.syncMutationResponse", "true").equals("true"); adhoc = props.getProperty("couchbase.adhoc", "false").equals("true"); kv = props.getProperty("couchbase.kv", "true").equals("true"); maxParallelism = Integer.parseInt(props.getProperty("couchbase.maxParallelism", "1")); kvEndpoints = Integer.parseInt(props.getProperty("couchbase.kvEndpoints", "1")); queryEndpoints = Integer.parseInt(props.getProperty("couchbase.queryEndpoints", "1")); epoll = props.getProperty("couchbase.epoll", "false").equals("true"); boost = Integer.parseInt(props.getProperty("couchbase.boost", "3")); networkMetricsInterval = Integer.parseInt(props.getProperty("couchbase.networkMetricsInterval", "0")); runtimeMetricsInterval = Integer.parseInt(props.getProperty("couchbase.runtimeMetricsInterval", "0")); documentExpiry = Integer.parseInt(props.getProperty("couchbase.documentExpiry", "0")); scanAllQuery = "SELECT RAW meta().id FROM `" + bucketName + "` WHERE meta().id >= '$1' ORDER BY meta().id LIMIT $2"; try { synchronized (INIT_COORDINATOR) { if (env == null) { LatencyMetricsCollectorConfig latencyConfig = networkMetricsInterval <= 0 ? DefaultLatencyMetricsCollectorConfig.disabled() : DefaultLatencyMetricsCollectorConfig .builder() .emitFrequency(networkMetricsInterval) .emitFrequencyUnit(TimeUnit.SECONDS) .build(); MetricsCollectorConfig runtimeConfig = runtimeMetricsInterval <= 0 ? DefaultMetricsCollectorConfig.disabled() : DefaultMetricsCollectorConfig.create(runtimeMetricsInterval, TimeUnit.SECONDS); DefaultCouchbaseEnvironment.Builder builder = DefaultCouchbaseEnvironment .builder() .queryEndpoints(queryEndpoints) .callbacksOnIoPool(true) .runtimeMetricsCollectorConfig(runtimeConfig) .networkLatencyMetricsCollectorConfig(latencyConfig) .socketConnectTimeout(10000) // 10 secs socket connect timeout .connectTimeout(30000) // 30 secs overall bucket open timeout .kvTimeout(10000) // 10 instead of 2.5s for KV ops .kvEndpoints(kvEndpoints); // Tune boosting and epoll based on settings SelectStrategyFactory factory = boost > 0 ? new BackoffSelectStrategyFactory() : DefaultSelectStrategyFactory.INSTANCE; int poolSize = boost > 0 ? boost : Integer.parseInt( System.getProperty("com.couchbase.ioPoolSize", Integer.toString(DefaultCoreEnvironment.IO_POOL_SIZE)) ); ThreadFactory threadFactory = new DefaultThreadFactory("cb-io", true); EventLoopGroup group = epoll ? new EpollEventLoopGroup(poolSize, threadFactory, factory) : new NioEventLoopGroup(poolSize, threadFactory, SelectorProvider.provider(), factory); builder.ioPool(group, new IoPoolShutdownHook(group)); env = builder.build(); logParams(); } } cluster = CouchbaseCluster.create(env, host); bucket = cluster.openBucket(bucketName, bucketPassword); kvTimeout = env.kvTimeout(); } catch (Exception ex) { throw new DBException("Could not connect to Couchbase Bucket.", ex); } if (!kv && !syncMutResponse) { throw new DBException("Not waiting for N1QL responses on mutations not yet implemented."); } } /** * Helper method to log the CLI params so that on the command line debugging is easier. */ private void logParams() { StringBuilder sb = new StringBuilder(); sb.append("host=").append(host); sb.append(", bucket=").append(bucketName); sb.append(", upsert=").append(upsert); sb.append(", persistTo=").append(persistTo); sb.append(", replicateTo=").append(replicateTo); sb.append(", syncMutResponse=").append(syncMutResponse); sb.append(", adhoc=").append(adhoc); sb.append(", kv=").append(kv); sb.append(", maxParallelism=").append(maxParallelism); sb.append(", queryEndpoints=").append(queryEndpoints); sb.append(", kvEndpoints=").append(kvEndpoints); sb.append(", queryEndpoints=").append(queryEndpoints); sb.append(", epoll=").append(epoll); sb.append(", boost=").append(boost); sb.append(", networkMetricsInterval=").append(networkMetricsInterval); sb.append(", runtimeMetricsInterval=").append(runtimeMetricsInterval); LOGGER.info("===> Using Params: " + sb.toString()); } @Override public Status read(final String table, final String key, Set<String> fields, final Map<String, ByteIterator> result) { try { String docId = formatId(table, key); if (kv) { return readKv(docId, fields, result); } else { return readN1ql(docId, fields, result); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #read(String, String, Set, Map)} operation via Key/Value ("get"). * * @param docId the document ID * @param fields the fields to be loaded * @param result the result map where the doc needs to be converted into * @return The result of the operation. */ private Status readKv(final String docId, final Set<String> fields, final Map<String, ByteIterator> result) throws Exception { RawJsonDocument loaded = bucket.get(docId, RawJsonDocument.class); if (loaded == null) { return Status.NOT_FOUND; } decode(loaded.content(), fields, result); return Status.OK; } /** * Performs the {@link #read(String, String, Set, Map)} operation via N1QL ("SELECT"). * * If this option should be used, the "-p couchbase.kv=false" property must be set. * * @param docId the document ID * @param fields the fields to be loaded * @param result the result map where the doc needs to be converted into * @return The result of the operation. */ private Status readN1ql(final String docId, Set<String> fields, final Map<String, ByteIterator> result) throws Exception { String readQuery = "SELECT " + joinFields(fields) + " FROM `" + bucketName + "` USE KEYS [$1]"; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( readQuery, JsonArray.from(docId), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new DBException("Error while parsing N1QL Result. Query: " + readQuery + ", Errors: " + queryResult.errors()); } N1qlQueryRow row; try { row = queryResult.rows().next(); } catch (NoSuchElementException ex) { return Status.NOT_FOUND; } JsonObject content = row.value(); if (fields == null) { content = content.getObject(bucketName); // n1ql result set scoped under *.bucketName fields = content.getNames(); } for (String field : fields) { Object value = content.get(field); result.put(field, new StringByteIterator(value != null ? value.toString() : "")); } return Status.OK; } @Override public Status update(final String table, final String key, final Map<String, ByteIterator> values) { if (upsert) { return upsert(table, key, values); } try { String docId = formatId(table, key); if (kv) { return updateKv(docId, values); } else { return updateN1ql(docId, values); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #update(String, String, Map)} operation via Key/Value ("replace"). * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status updateKv(final String docId, final Map<String, ByteIterator> values) { waitForMutationResponse(bucket.async().replace( RawJsonDocument.create(docId, documentExpiry, encode(values)), persistTo, replicateTo )); return Status.OK; } /** * Performs the {@link #update(String, String, Map)} operation via N1QL ("UPDATE"). * * If this option should be used, the "-p couchbase.kv=false" property must be set. * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status updateN1ql(final String docId, final Map<String, ByteIterator> values) throws Exception { String fields = encodeN1qlFields(values); String updateQuery = "UPDATE `" + bucketName + "` USE KEYS [$1] SET " + fields; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( updateQuery, JsonArray.from(docId), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new DBException("Error while parsing N1QL Result. Query: " + updateQuery + ", Errors: " + queryResult.errors()); } return Status.OK; } @Override public Status insert(final String table, final String key, final Map<String, ByteIterator> values) { if (upsert) { return upsert(table, key, values); } try { String docId = formatId(table, key); if (kv) { return insertKv(docId, values); } else { return insertN1ql(docId, values); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #insert(String, String, Map)} operation via Key/Value ("INSERT"). * * Note that during the "load" phase it makes sense to retry TMPFAILS (so that even if the server is * overloaded temporarily the ops will succeed eventually). The current code will retry TMPFAILs * for maximum of one minute and then bubble up the error. * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status insertKv(final String docId, final Map<String, ByteIterator> values) { int tries = 60; // roughly 60 seconds with the 1 second sleep, not 100% accurate. for(int i = 0; i < tries; i++) { try { waitForMutationResponse(bucket.async().insert( RawJsonDocument.create(docId, documentExpiry, encode(values)), persistTo, replicateTo )); return Status.OK; } catch (TemporaryFailureException ex) { try { Thread.sleep(1000); } catch (InterruptedException e) { throw new RuntimeException("Interrupted while sleeping on TMPFAIL backoff.", ex); } } } throw new RuntimeException("Still receiving TMPFAIL from the server after trying " + tries + " times. " + "Check your server."); } /** * Performs the {@link #insert(String, String, Map)} operation via N1QL ("INSERT"). * * If this option should be used, the "-p couchbase.kv=false" property must be set. * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status insertN1ql(final String docId, final Map<String, ByteIterator> values) throws Exception { String insertQuery = "INSERT INTO `" + bucketName + "`(KEY,VALUE) VALUES ($1,$2)"; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( insertQuery, JsonArray.from(docId, valuesToJsonObject(values)), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new DBException("Error while parsing N1QL Result. Query: " + insertQuery + ", Errors: " + queryResult.errors()); } return Status.OK; } /** * Performs an upsert instead of insert or update using either Key/Value or N1QL. * * If this option should be used, the "-p couchbase.upsert=true" property must be set. * * @param table The name of the table * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record * @return The result of the operation. */ private Status upsert(final String table, final String key, final Map<String, ByteIterator> values) { try { String docId = formatId(table, key); if (kv) { return upsertKv(docId, values); } else { return upsertN1ql(docId, values); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #upsert(String, String, Map)} operation via Key/Value ("upsert"). * * If this option should be used, the "-p couchbase.upsert=true" property must be set. * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status upsertKv(final String docId, final Map<String, ByteIterator> values) { waitForMutationResponse(bucket.async().upsert( RawJsonDocument.create(docId, documentExpiry, encode(values)), persistTo, replicateTo )); return Status.OK; } /** * Performs the {@link #upsert(String, String, Map)} operation via N1QL ("UPSERT"). * * If this option should be used, the "-p couchbase.upsert=true -p couchbase.kv=false" properties must be set. * * @param docId the document ID * @param values the values to update the document with. * @return The result of the operation. */ private Status upsertN1ql(final String docId, final Map<String, ByteIterator> values) throws Exception { String upsertQuery = "UPSERT INTO `" + bucketName + "`(KEY,VALUE) VALUES ($1,$2)"; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( upsertQuery, JsonArray.from(docId, valuesToJsonObject(values)), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new DBException("Error while parsing N1QL Result. Query: " + upsertQuery + ", Errors: " + queryResult.errors()); } return Status.OK; } @Override public Status delete(final String table, final String key) { try { String docId = formatId(table, key); if (kv) { return deleteKv(docId); } else { return deleteN1ql(docId); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #delete(String, String)} (String, String)} operation via Key/Value ("remove"). * * @param docId the document ID. * @return The result of the operation. */ private Status deleteKv(final String docId) { waitForMutationResponse(bucket.async().remove( docId, persistTo, replicateTo )); return Status.OK; } /** * Performs the {@link #delete(String, String)} (String, String)} operation via N1QL ("DELETE"). * * If this option should be used, the "-p couchbase.kv=false" property must be set. * * @param docId the document ID. * @return The result of the operation. */ private Status deleteN1ql(final String docId) throws Exception { String deleteQuery = "DELETE FROM `" + bucketName + "` USE KEYS [$1]"; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( deleteQuery, JsonArray.from(docId), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new DBException("Error while parsing N1QL Result. Query: " + deleteQuery + ", Errors: " + queryResult.errors()); } return Status.OK; } @Override public Status scan(final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { try { if (fields == null || fields.isEmpty()) { return scanAllFields(table, startkey, recordcount, result); } else { return scanSpecificFields(table, startkey, recordcount, fields, result); } } catch (Exception ex) { ex.printStackTrace(); return Status.ERROR; } } /** * Performs the {@link #scan(String, String, int, Set, Vector)} operation, optimized for all fields. * * Since the full document bodies need to be loaded anyways, it makes sense to just grab the document IDs * from N1QL and then perform the bulk loading via KV for better performance. This is a usual pattern with * Couchbase and shows the benefits of using both N1QL and KV together. * * @param table The name of the table * @param startkey The record key of the first record to read. * @param recordcount The number of records to read * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return The result of the operation. */ private Status scanAllFields(final String table, final String startkey, final int recordcount, final Vector<HashMap<String, ByteIterator>> result) { final List<HashMap<String, ByteIterator>> data = new ArrayList<HashMap<String, ByteIterator>>(recordcount); bucket.async() .query(N1qlQuery.parameterized( scanAllQuery, JsonArray.from(formatId(table, startkey), recordcount), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )) .doOnNext(new Action1<AsyncN1qlQueryResult>() { @Override public void call(AsyncN1qlQueryResult result) { if (!result.parseSuccess()) { throw new RuntimeException("Error while parsing N1QL Result. Query: " + scanAllQuery + ", Errors: " + result.errors()); } } }) .flatMap(new Func1<AsyncN1qlQueryResult, Observable<AsyncN1qlQueryRow>>() { @Override public Observable<AsyncN1qlQueryRow> call(AsyncN1qlQueryResult result) { return result.rows(); } }) .flatMap(new Func1<AsyncN1qlQueryRow, Observable<RawJsonDocument>>() { @Override public Observable<RawJsonDocument> call(AsyncN1qlQueryRow row) { String id = new String(row.byteValue()).trim(); return bucket.async().get(id.substring(1, id.length()-1), RawJsonDocument.class); } }) .map(new Func1<RawJsonDocument, HashMap<String, ByteIterator>>() { @Override public HashMap<String, ByteIterator> call(RawJsonDocument document) { HashMap<String, ByteIterator> tuple = new HashMap<String, ByteIterator>(); decode(document.content(), null, tuple); return tuple; } }) .toBlocking() .forEach(new Action1<HashMap<String, ByteIterator>>() { @Override public void call(HashMap<String, ByteIterator> tuple) { data.add(tuple); } }); result.addAll(data); return Status.OK; } /** * Performs the {@link #scan(String, String, int, Set, Vector)} operation N1Ql only for a subset of the fields. * * @param table The name of the table * @param startkey The record key of the first record to read. * @param recordcount The number of records to read * @param fields The list of fields to read, or null for all of them * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return The result of the operation. */ private Status scanSpecificFields(final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { String scanSpecQuery = "SELECT " + joinFields(fields) + " FROM `" + bucketName + "` WHERE meta().id >= '$1' LIMIT $2"; N1qlQueryResult queryResult = bucket.query(N1qlQuery.parameterized( scanSpecQuery, JsonArray.from(formatId(table, startkey), recordcount), N1qlParams.build().adhoc(adhoc).maxParallelism(maxParallelism) )); if (!queryResult.parseSuccess() || !queryResult.finalSuccess()) { throw new RuntimeException("Error while parsing N1QL Result. Query: " + scanSpecQuery + ", Errors: " + queryResult.errors()); } boolean allFields = fields == null || fields.isEmpty(); result.ensureCapacity(recordcount); for (N1qlQueryRow row : queryResult) { JsonObject value = row.value(); if (fields == null) { value = value.getObject(bucketName); } Set<String> f = allFields ? value.getNames() : fields; HashMap<String, ByteIterator> tuple = new HashMap<String, ByteIterator>(f.size()); for (String field : f) { tuple.put(field, new StringByteIterator(value.getString(field))); } result.add(tuple); } return Status.OK; } /** * Helper method to block on the response, depending on the property set. * * By default, since YCSB is sync the code will always wait for the operation to complete. In some * cases it can be useful to just "drive load" and disable the waiting. Note that when the * "-p couchbase.syncMutationResponse=false" option is used, the measured results by YCSB can basically * be thrown away. Still helpful sometimes during load phases to speed them up :) * * @param input the async input observable. */ private void waitForMutationResponse(final Observable<? extends Document<?>> input) { if (!syncMutResponse) { ((Observable<Document<?>>)input).subscribe(new Subscriber<Document<?>>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { } @Override public void onNext(Document<?> document) { } }); } else { Blocking.blockForSingle(input, kvTimeout, TimeUnit.MILLISECONDS); } } /** * Helper method to turn the values into a String, used with {@link #upsertN1ql(String, Map)}. * * @param values the values to encode. * @return the encoded string. */ private static String encodeN1qlFields(final Map<String, ByteIterator> values) { if (values.isEmpty()) { return ""; } StringBuilder sb = new StringBuilder(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { String raw = entry.getValue().toString(); String escaped = raw.replace("\"", "\\\"").replace("\'", "\\\'"); sb.append(entry.getKey()).append("=\"").append(escaped).append("\" "); } String toReturn = sb.toString(); return toReturn.substring(0, toReturn.length() - 1); } /** * Helper method to turn the map of values into a {@link JsonObject} for further use. * * @param values the values to transform. * @return the created json object. */ private static JsonObject valuesToJsonObject(final Map<String, ByteIterator> values) { JsonObject result = JsonObject.create(); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { result.put(entry.getKey(), entry.getValue().toString()); } return result; } /** * Helper method to join the set of fields into a String suitable for N1QL. * * @param fields the fields to join. * @return the joined fields as a String. */ private static String joinFields(final Set<String> fields) { if (fields == null || fields.isEmpty()) { return "*"; } StringBuilder builder = new StringBuilder(); for (String f : fields) { builder.append("`").append(f).append("`").append(","); } String toReturn = builder.toString(); return toReturn.substring(0, toReturn.length() - 1); } /** * Helper method to turn the prefix and key into a proper document ID. * * @param prefix the prefix (table). * @param key the key itself. * @return a document ID that can be used with Couchbase. */ private static String formatId(final String prefix, final String key) { return prefix + SEPARATOR + key; } /** * Helper method to parse the "ReplicateTo" property on startup. * * @param property the proeprty to parse. * @return the parsed setting. */ private static ReplicateTo parseReplicateTo(final String property) throws DBException { int value = Integer.parseInt(property); switch (value) { case 0: return ReplicateTo.NONE; case 1: return ReplicateTo.ONE; case 2: return ReplicateTo.TWO; case 3: return ReplicateTo.THREE; default: throw new DBException("\"couchbase.replicateTo\" must be between 0 and 3"); } } /** * Helper method to parse the "PersistTo" property on startup. * * @param property the proeprty to parse. * @return the parsed setting. */ private static PersistTo parsePersistTo(final String property) throws DBException { int value = Integer.parseInt(property); switch (value) { case 0: return PersistTo.NONE; case 1: return PersistTo.ONE; case 2: return PersistTo.TWO; case 3: return PersistTo.THREE; case 4: return PersistTo.FOUR; default: throw new DBException("\"couchbase.persistTo\" must be between 0 and 4"); } } /** * Decode the String from server and pass it into the decoded destination. * * @param source the loaded object. * @param fields the fields to check. * @param dest the result passed back to YCSB. */ private void decode(final String source, final Set<String> fields, final Map<String, ByteIterator> dest) { try { JsonNode json = JacksonTransformers.MAPPER.readTree(source); boolean checkFields = fields != null && !fields.isEmpty(); for (Iterator<Map.Entry<String, JsonNode>> jsonFields = json.fields(); jsonFields.hasNext();) { Map.Entry<String, JsonNode> jsonField = jsonFields.next(); String name = jsonField.getKey(); if (checkFields && !fields.contains(name)) { continue; } JsonNode jsonValue = jsonField.getValue(); if (jsonValue != null && !jsonValue.isNull()) { dest.put(name, new StringByteIterator(jsonValue.asText())); } } } catch (Exception e) { throw new RuntimeException("Could not decode JSON"); } } /** * Encode the source into a String for storage. * * @param source the source value. * @return the encoded string. */ private String encode(final Map<String, ByteIterator> source) { Map<String, String> stringMap = StringByteIterator.getStringMap(source); ObjectNode node = JacksonTransformers.MAPPER.createObjectNode(); for (Map.Entry<String, String> pair : stringMap.entrySet()) { node.put(pair.getKey(), pair.getValue()); } JsonFactory jsonFactory = new JsonFactory(); Writer writer = new StringWriter(); try { JsonGenerator jsonGenerator = jsonFactory.createGenerator(writer); JacksonTransformers.MAPPER.writeTree(jsonGenerator, node); } catch (Exception e) { throw new RuntimeException("Could not encode JSON value"); } return writer.toString(); } } /** * Factory for the {@link BackoffSelectStrategy} to be used with boosting. */ class BackoffSelectStrategyFactory implements SelectStrategyFactory { @Override public SelectStrategy newSelectStrategy() { return new BackoffSelectStrategy(); } } /** * Custom IO select strategy which trades CPU for throughput, used with the boost setting. */ class BackoffSelectStrategy implements SelectStrategy { private int counter = 0; @Override public int calculateStrategy(final IntSupplier supplier, final boolean hasTasks) throws Exception { int selectNowResult = supplier.get(); if (hasTasks || selectNowResult != 0) { counter = 0; return selectNowResult; } counter++; if (counter > 2000) { LockSupport.parkNanos(1); } else if (counter > 3000) { Thread.yield(); } else if (counter > 4000) { LockSupport.parkNanos(1000); } else if (counter > 5000) { // defer to blocking select counter = 0; return SelectStrategy.SELECT; } return SelectStrategy.CONTINUE; } }
35,589
36.821467
115
java
null
NearPMSW-main/baseline/logging/YCSB2/riak/src/test/java/site/ycsb/db/riak/RiakKVClientTest.java
/** * Copyright (c) 2016 YCSB contributors All rights reserved. * Copyright 2014 Basho Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.riak; import java.util.*; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assume.assumeNoException; import static org.junit.Assume.assumeThat; /** * Integration tests for the Riak KV client. */ public class RiakKVClientTest { private static RiakKVClient riakClient; private static final String bucket = "testBucket"; private static final String keyPrefix = "testKey"; private static final int recordsToInsert = 20; private static final int recordsToScan = 7; private static final String firstField = "Key number"; private static final String secondField = "Key number doubled"; private static final String thirdField = "Key number square"; private static boolean testStarted = false; /** * Creates a cluster for testing purposes. */ @BeforeClass public static void setUpClass() throws Exception { riakClient = new RiakKVClient(); riakClient.init(); // Set the test bucket environment with the appropriate parameters. try { riakClient.setTestEnvironment(bucket); } catch(Exception e) { assumeNoException("Unable to configure Riak KV for test, aborting.", e); } // Just add some records to work on... for (int i = 0; i < recordsToInsert; i++) { // Abort the entire test whenever the dataset population operation fails. assumeThat("Riak KV is NOT RUNNING, aborting test.", riakClient.insert(bucket, keyPrefix + String.valueOf(i), StringByteIterator.getByteIteratorMap( createExpectedHashMap(i))), is(Status.OK)); } // Variable to check to determine whether the test has started or not. testStarted = true; } /** * Shuts down the cluster created. */ @AfterClass public static void tearDownClass() throws Exception { // Delete all added keys before cleanup ONLY IF TEST ACTUALLY STARTED. if (testStarted) { for (int i = 0; i <= recordsToInsert; i++) { delete(keyPrefix + Integer.toString(i)); } } riakClient.cleanup(); } /** * Test method for read transaction. It is designed to read two of the three fields stored for each key, to also test * if the createResultHashMap() function implemented in RiakKVClient.java works as expected. */ @Test public void testRead() { // Choose a random key to read, among the available ones. int readKeyNumber = new Random().nextInt(recordsToInsert); // Prepare two fields to read. Set<String> fields = new HashSet<>(); fields.add(firstField); fields.add(thirdField); // Prepare an expected result. HashMap<String, String> expectedValue = new HashMap<>(); expectedValue.put(firstField, Integer.toString(readKeyNumber)); expectedValue.put(thirdField, Integer.toString(readKeyNumber * readKeyNumber)); // Define a HashMap to store the actual result. HashMap<String, ByteIterator> readValue = new HashMap<>(); // If a read transaction has been properly done, then one has to receive a Status.OK return from the read() // function. Moreover, the actual returned result MUST match the expected one. assertEquals("Read transaction FAILED.", Status.OK, riakClient.read(bucket, keyPrefix + Integer.toString(readKeyNumber), fields, readValue)); assertEquals("Read test FAILED. Actual read transaction value is NOT MATCHING the expected one.", expectedValue.toString(), readValue.toString()); } /** * Test method for scan transaction. A scan transaction has to be considered successfully completed only if all the * requested values are read (i.e. scan transaction returns with Status.OK). Moreover, one has to check if the * obtained results match the expected ones. */ @Test public void testScan() { // Choose, among the available ones, a random key as starting point for the scan transaction. int startScanKeyNumber = new Random().nextInt(recordsToInsert - recordsToScan); // Prepare a HashMap vector to store the scan transaction results. Vector<HashMap<String, ByteIterator>> scannedValues = new Vector<>(); // Check whether the scan transaction is correctly performed or not. assertEquals("Scan transaction FAILED.", Status.OK, riakClient.scan(bucket, keyPrefix + Integer.toString(startScanKeyNumber), recordsToScan, null, scannedValues)); // After the scan transaction completes, compare the obtained results with the expected ones. for (int i = 0; i < recordsToScan; i++) { assertEquals("Scan test FAILED: the current scanned key is NOT MATCHING the expected one.", createExpectedHashMap(startScanKeyNumber + i).toString(), scannedValues.get(i).toString()); } } /** * Test method for update transaction. The test is designed to restore the previously read key. It is assumed to be * correct when, after performing the update transaction, one reads the just provided values. */ @Test public void testUpdate() { // Choose a random key to read, among the available ones. int updateKeyNumber = new Random().nextInt(recordsToInsert); // Define a HashMap to save the previously stored values for eventually restoring them. HashMap<String, ByteIterator> readValueBeforeUpdate = new HashMap<>(); riakClient.read(bucket, keyPrefix + Integer.toString(updateKeyNumber), null, readValueBeforeUpdate); // Prepare an update HashMap to store. HashMap<String, String> updateValue = new HashMap<>(); updateValue.put(firstField, "UPDATED"); updateValue.put(secondField, "UPDATED"); updateValue.put(thirdField, "UPDATED"); // First of all, perform the update and check whether it's failed or not. assertEquals("Update transaction FAILED.", Status.OK, riakClient.update(bucket, keyPrefix + Integer.toString(updateKeyNumber), StringByteIterator .getByteIteratorMap(updateValue))); // Then, read the key again and... HashMap<String, ByteIterator> readValueAfterUpdate = new HashMap<>(); assertEquals("Update test FAILED. Unable to read key value.", Status.OK, riakClient.read(bucket, keyPrefix + Integer.toString(updateKeyNumber), null, readValueAfterUpdate)); // ...compare the result with the new one! assertEquals("Update transaction NOT EXECUTED PROPERLY. Values DID NOT CHANGE.", updateValue.toString(), readValueAfterUpdate.toString()); // Finally, restore the previously read key. assertEquals("Update test FAILED. Unable to restore previous key value.", Status.OK, riakClient.update(bucket, keyPrefix + Integer.toString(updateKeyNumber), readValueBeforeUpdate)); } /** * Test method for insert transaction. It is designed to insert a key just after the last key inserted in the setUp() * phase. */ @Test public void testInsert() { // Define a HashMap to insert and another one for the comparison operation. HashMap<String, String> insertValue = createExpectedHashMap(recordsToInsert); HashMap<String, ByteIterator> readValue = new HashMap<>(); // Check whether the insertion transaction was performed or not. assertEquals("Insert transaction FAILED.", Status.OK, riakClient.insert(bucket, keyPrefix + Integer.toString(recordsToInsert), StringByteIterator. getByteIteratorMap(insertValue))); // Finally, compare the insertion performed with the one expected by reading the key. assertEquals("Insert test FAILED. Unable to read inserted value.", Status.OK, riakClient.read(bucket, keyPrefix + Integer.toString(recordsToInsert), null, readValue)); assertEquals("Insert test FAILED. Actual read transaction value is NOT MATCHING the inserted one.", insertValue.toString(), readValue.toString()); } /** * Test method for delete transaction. The test deletes a key, then performs a read that should give a * Status.NOT_FOUND response. Finally, it restores the previously read key. */ @Test public void testDelete() { // Choose a random key to delete, among the available ones. int deleteKeyNumber = new Random().nextInt(recordsToInsert); // Define a HashMap to save the previously stored values for its eventual restore. HashMap<String, ByteIterator> readValueBeforeDelete = new HashMap<>(); riakClient.read(bucket, keyPrefix + Integer.toString(deleteKeyNumber), null, readValueBeforeDelete); // First of all, delete the key. assertEquals("Delete transaction FAILED.", Status.OK, delete(keyPrefix + Integer.toString(deleteKeyNumber))); // Then, check if the deletion was actually achieved. assertEquals("Delete test FAILED. Key NOT deleted.", Status.NOT_FOUND, riakClient.read(bucket, keyPrefix + Integer.toString(deleteKeyNumber), null, null)); // Finally, restore the previously deleted key. assertEquals("Delete test FAILED. Unable to restore previous key value.", Status.OK, riakClient.insert(bucket, keyPrefix + Integer.toString(deleteKeyNumber), readValueBeforeDelete)); } private static Status delete(String key) { return riakClient.delete(bucket, key); } private static HashMap<String, String> createExpectedHashMap(int value) { HashMap<String, String> values = new HashMap<>(); values.put(firstField, Integer.toString(value)); values.put(secondField, Integer.toString(2 * value)); values.put(thirdField, Integer.toString(value * value)); return values; } }
10,509
38.660377
119
java
null
NearPMSW-main/baseline/logging/YCSB2/riak/src/main/java/site/ycsb/db/riak/package-info.java
/** * Copyright (c) 2016 YCSB contributors All rights reserved. * Copyright 2014 Basho Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://basho.com/products/riak-kv/">Riak KV</a> 2.x.y. * */ package site.ycsb.db.riak;
827
33.5
87
java
null
NearPMSW-main/baseline/logging/YCSB2/riak/src/main/java/site/ycsb/db/riak/RiakKVClient.java
/** * Copyright (c) 2016 YCSB contributors All rights reserved. * Copyright 2014 Basho Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.riak; import com.basho.riak.client.api.commands.buckets.StoreBucketProperties; import com.basho.riak.client.api.commands.kv.StoreValue; import com.basho.riak.client.api.commands.kv.UpdateValue; import com.basho.riak.client.core.RiakFuture; import com.basho.riak.client.core.query.RiakObject; import com.basho.riak.client.core.query.indexes.LongIntIndex; import com.basho.riak.client.core.util.BinaryValue; import site.ycsb.*; import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import com.basho.riak.client.api.RiakClient; import com.basho.riak.client.api.cap.Quorum; import com.basho.riak.client.api.commands.indexes.IntIndexQuery; import com.basho.riak.client.api.commands.kv.DeleteValue; import com.basho.riak.client.api.commands.kv.FetchValue; import com.basho.riak.client.core.RiakCluster; import com.basho.riak.client.core.RiakNode; import com.basho.riak.client.core.query.Location; import com.basho.riak.client.core.query.Namespace; import static site.ycsb.db.riak.RiakUtils.createResultHashMap; import static site.ycsb.db.riak.RiakUtils.getKeyAsLong; import static site.ycsb.db.riak.RiakUtils.serializeTable; /** * Riak KV 2.x.y client for YCSB framework. * */ public class RiakKVClient extends DB { private static final String HOST_PROPERTY = "riak.hosts"; private static final String PORT_PROPERTY = "riak.port"; private static final String BUCKET_TYPE_PROPERTY = "riak.bucket_type"; private static final String R_VALUE_PROPERTY = "riak.r_val"; private static final String W_VALUE_PROPERTY = "riak.w_val"; private static final String READ_RETRY_COUNT_PROPERTY = "riak.read_retry_count"; private static final String WAIT_TIME_BEFORE_RETRY_PROPERTY = "riak.wait_time_before_retry"; private static final String TRANSACTION_TIME_LIMIT_PROPERTY = "riak.transaction_time_limit"; private static final String STRONG_CONSISTENCY_PROPERTY = "riak.strong_consistency"; private static final String STRONG_CONSISTENT_SCANS_BUCKET_TYPE_PROPERTY = "riak.strong_consistent_scans_bucket_type"; private static final String DEBUG_PROPERTY = "riak.debug"; private static final Status TIME_OUT = new Status("TIME_OUT", "Cluster didn't respond after maximum wait time."); private String[] hosts; private int port; private String bucketType; private String bucketType2i; private Quorum rvalue; private Quorum wvalue; private int readRetryCount; private int waitTimeBeforeRetry; private int transactionTimeLimit; private boolean strongConsistency; private String strongConsistentScansBucketType; private boolean performStrongConsistentScans; private boolean debug; private RiakClient riakClient; private RiakCluster riakCluster; private void loadDefaultProperties() { InputStream propFile = RiakKVClient.class.getClassLoader().getResourceAsStream("riak.properties"); Properties propsPF = new Properties(System.getProperties()); try { propsPF.load(propFile); } catch (IOException e) { e.printStackTrace(); } hosts = propsPF.getProperty(HOST_PROPERTY).split(","); port = Integer.parseInt(propsPF.getProperty(PORT_PROPERTY)); bucketType = propsPF.getProperty(BUCKET_TYPE_PROPERTY); rvalue = new Quorum(Integer.parseInt(propsPF.getProperty(R_VALUE_PROPERTY))); wvalue = new Quorum(Integer.parseInt(propsPF.getProperty(W_VALUE_PROPERTY))); readRetryCount = Integer.parseInt(propsPF.getProperty(READ_RETRY_COUNT_PROPERTY)); waitTimeBeforeRetry = Integer.parseInt(propsPF.getProperty(WAIT_TIME_BEFORE_RETRY_PROPERTY)); transactionTimeLimit = Integer.parseInt(propsPF.getProperty(TRANSACTION_TIME_LIMIT_PROPERTY)); strongConsistency = Boolean.parseBoolean(propsPF.getProperty(STRONG_CONSISTENCY_PROPERTY)); strongConsistentScansBucketType = propsPF.getProperty(STRONG_CONSISTENT_SCANS_BUCKET_TYPE_PROPERTY); debug = Boolean.parseBoolean(propsPF.getProperty(DEBUG_PROPERTY)); } private void loadProperties() { // First, load the default properties... loadDefaultProperties(); // ...then, check for some props set at command line! Properties props = getProperties(); String portString = props.getProperty(PORT_PROPERTY); if (portString != null) { port = Integer.parseInt(portString); } String hostsString = props.getProperty(HOST_PROPERTY); if (hostsString != null) { hosts = hostsString.split(","); } String bucketTypeString = props.getProperty(BUCKET_TYPE_PROPERTY); if (bucketTypeString != null) { bucketType = bucketTypeString; } String rValueString = props.getProperty(R_VALUE_PROPERTY); if (rValueString != null) { rvalue = new Quorum(Integer.parseInt(rValueString)); } String wValueString = props.getProperty(W_VALUE_PROPERTY); if (wValueString != null) { wvalue = new Quorum(Integer.parseInt(wValueString)); } String readRetryCountString = props.getProperty(READ_RETRY_COUNT_PROPERTY); if (readRetryCountString != null) { readRetryCount = Integer.parseInt(readRetryCountString); } String waitTimeBeforeRetryString = props.getProperty(WAIT_TIME_BEFORE_RETRY_PROPERTY); if (waitTimeBeforeRetryString != null) { waitTimeBeforeRetry = Integer.parseInt(waitTimeBeforeRetryString); } String transactionTimeLimitString = props.getProperty(TRANSACTION_TIME_LIMIT_PROPERTY); if (transactionTimeLimitString != null) { transactionTimeLimit = Integer.parseInt(transactionTimeLimitString); } String strongConsistencyString = props.getProperty(STRONG_CONSISTENCY_PROPERTY); if (strongConsistencyString != null) { strongConsistency = Boolean.parseBoolean(strongConsistencyString); } String strongConsistentScansBucketTypeString = props.getProperty(STRONG_CONSISTENT_SCANS_BUCKET_TYPE_PROPERTY); if (strongConsistentScansBucketTypeString != null) { strongConsistentScansBucketType = strongConsistentScansBucketTypeString; } String debugString = props.getProperty(DEBUG_PROPERTY); if (debugString != null) { debug = Boolean.parseBoolean(debugString); } } public void init() throws DBException { loadProperties(); RiakNode.Builder builder = new RiakNode.Builder().withRemotePort(port); List<RiakNode> nodes = RiakNode.Builder.buildNodes(builder, Arrays.asList(hosts)); riakCluster = new RiakCluster.Builder(nodes).build(); try { riakCluster.start(); riakClient = new RiakClient(riakCluster); } catch (Exception e) { System.err.println("Unable to properly start up the cluster. Reason: " + e.toString()); throw new DBException(e); } // If strong consistency is in use, we need to change the bucket-type where the 2i indexes will be stored. if (strongConsistency && !strongConsistentScansBucketType.isEmpty()) { // The 2i indexes have to be stored in the appositely created strongConsistentScansBucketType: this however has // to be done only if the user actually created it! So, if the latter doesn't exist, then the scan transactions // will not be performed at all. bucketType2i = strongConsistentScansBucketType; performStrongConsistentScans = true; } else { // If instead eventual consistency is in use, then the 2i indexes have to be stored in the bucket-type // indicated with the bucketType variable. bucketType2i = bucketType; performStrongConsistentScans = false; } if (debug) { System.err.println("DEBUG ENABLED. Configuration parameters:"); System.err.println("-----------------------------------------"); System.err.println("Hosts: " + Arrays.toString(hosts)); System.err.println("Port: " + port); System.err.println("Bucket Type: " + bucketType); System.err.println("R Val: " + rvalue.toString()); System.err.println("W Val: " + wvalue.toString()); System.err.println("Read Retry Count: " + readRetryCount); System.err.println("Wait Time Before Retry: " + waitTimeBeforeRetry + " ms"); System.err.println("Transaction Time Limit: " + transactionTimeLimit + " s"); System.err.println("Consistency model: " + (strongConsistency ? "Strong" : "Eventual")); if (strongConsistency) { System.err.println("Strong Consistent Scan Transactions " + (performStrongConsistentScans ? "" : "NOT ") + "allowed."); } } } /** * Read a record from the database. Each field/value pair from the result will be stored in a HashMap. * * @param table The name of the table (Riak bucket) * @param key The record key of the record to read. * @param fields The list of fields to read, or null for all of them * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Location location = new Location(new Namespace(bucketType, table), key); FetchValue fv = new FetchValue.Builder(location).withOption(FetchValue.Option.R, rvalue).build(); FetchValue.Response response; try { response = fetch(fv); if (response.isNotFound()) { if (debug) { System.err.println("Unable to read key " + key + ". Reason: NOT FOUND"); } return Status.NOT_FOUND; } } catch (TimeoutException e) { if (debug) { System.err.println("Unable to read key " + key + ". Reason: TIME OUT"); } return TIME_OUT; } catch (Exception e) { if (debug) { System.err.println("Unable to read key " + key + ". Reason: " + e.toString()); } return Status.ERROR; } // Create the result HashMap. HashMap<String, ByteIterator> partialResult = new HashMap<>(); createResultHashMap(fields, response, partialResult); result.putAll(partialResult); return Status.OK; } /** * Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in * a HashMap. * Note: The scan operation requires the use of secondary indexes (2i) and LevelDB. * * @param table The name of the table (Riak bucket) * @param startkey The record key of the first record to read. * @param recordcount The number of records to read * @param fields The list of fields to read, or null for all of them * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return Zero on success, a non-zero error code on error */ @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { if (strongConsistency && !performStrongConsistentScans) { return Status.NOT_IMPLEMENTED; } // The strong consistent bucket-type is not capable of storing 2i indexes. So, we need to read them from the fake // one (which we use only to store indexes). This is why, when using such a consistency model, the bucketType2i // variable is set to FAKE_BUCKET_TYPE. IntIndexQuery iiq = new IntIndexQuery .Builder(new Namespace(bucketType2i, table), "key", getKeyAsLong(startkey), Long.MAX_VALUE) .withMaxResults(recordcount) .withPaginationSort(true) .build(); Location location; RiakFuture<IntIndexQuery.Response, IntIndexQuery> future = riakClient.executeAsync(iiq); try { IntIndexQuery.Response response = future.get(transactionTimeLimit, TimeUnit.SECONDS); List<IntIndexQuery.Response.Entry> entries = response.getEntries(); // If no entries were retrieved, then something bad happened... if (entries.size() == 0) { if (debug) { System.err.println("Unable to scan any record starting from key " + startkey + ", aborting transaction. " + "Reason: NOT FOUND"); } return Status.NOT_FOUND; } for (IntIndexQuery.Response.Entry entry : entries) { // If strong consistency is in use, then the actual location of the object we want to read is obtained by // fetching the key from the one retrieved with the 2i indexes search operation. if (strongConsistency) { location = new Location(new Namespace(bucketType, table), entry.getRiakObjectLocation().getKeyAsString()); } else { location = entry.getRiakObjectLocation(); } FetchValue fv = new FetchValue.Builder(location) .withOption(FetchValue.Option.R, rvalue) .build(); FetchValue.Response keyResponse = fetch(fv); if (keyResponse.isNotFound()) { if (debug) { System.err.println("Unable to scan all requested records starting from key " + startkey + ", aborting " + "transaction. Reason: NOT FOUND"); } return Status.NOT_FOUND; } // Create the partial result to add to the result vector. HashMap<String, ByteIterator> partialResult = new HashMap<>(); createResultHashMap(fields, keyResponse, partialResult); result.add(partialResult); } } catch (TimeoutException e) { if (debug) { System.err.println("Unable to scan all requested records starting from key " + startkey + ", aborting " + "transaction. Reason: TIME OUT"); } return TIME_OUT; } catch (Exception e) { if (debug) { System.err.println("Unable to scan all records starting from key " + startkey + ", aborting transaction. " + "Reason: " + e.toString()); } return Status.ERROR; } return Status.OK; } /** * Tries to perform a read and, whenever it fails, retries to do it. It actually does try as many time as indicated, * even if the function riakClient.execute(fv) throws an exception. This is needed for those situation in which the * cluster is unable to respond properly due to overload. Note however that if the cluster doesn't respond after * transactionTimeLimit, the transaction is discarded immediately. * * @param fv The value to fetch from the cluster. */ private FetchValue.Response fetch(FetchValue fv) throws TimeoutException { FetchValue.Response response = null; for (int i = 0; i < readRetryCount; i++) { RiakFuture<FetchValue.Response, Location> future = riakClient.executeAsync(fv); try { response = future.get(transactionTimeLimit, TimeUnit.SECONDS); if (!response.isNotFound()) { break; } } catch (TimeoutException e) { // Let the callee decide how to handle this exception... throw new TimeoutException(); } catch (Exception e) { // Sleep for a few ms before retrying... try { Thread.sleep(waitTimeBeforeRetry); } catch (InterruptedException e1) { e1.printStackTrace(); } } } return response; } /** * Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the * record with the specified record key. Also creates a secondary index (2i) for each record consisting of the key * converted to long to be used for the scan operation. * * @param table The name of the table (Riak bucket) * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { Location location = new Location(new Namespace(bucketType, table), key); RiakObject object = new RiakObject(); // Strong consistency doesn't support secondary indexing, but eventually consistent model does. So, we can mock a // 2i usage by creating a fake object stored in an eventually consistent bucket-type with the SAME KEY THAT THE // ACTUAL OBJECT HAS. This latter is obviously stored in the strong consistent bucket-type indicated with the // riak.bucket_type property. if (strongConsistency && performStrongConsistentScans) { // Create a fake object to store in the default bucket-type just to keep track of the 2i indices. Location fakeLocation = new Location(new Namespace(strongConsistentScansBucketType, table), key); // Obviously, we want the fake object to contain as less data as possible. We can't create a void object, so // we have to choose the minimum data size allowed: it is one byte. RiakObject fakeObject = new RiakObject(); fakeObject.setValue(BinaryValue.create(new byte[]{0x00})); fakeObject.getIndexes().getIndex(LongIntIndex.named("key_int")).add(getKeyAsLong(key)); StoreValue fakeStore = new StoreValue.Builder(fakeObject) .withLocation(fakeLocation) .build(); // We don't mind whether the operation is finished or not, because waiting for it to complete would slow down the // client and make our solution too heavy to be seen as a valid compromise. This will obviously mean that under // heavy load conditions a scan operation could fail due to an unfinished "fakeStore". riakClient.executeAsync(fakeStore); } else if (!strongConsistency) { // The next operation is useless when using strong consistency model, so it's ok to perform it only when using // eventual consistency. object.getIndexes().getIndex(LongIntIndex.named("key_int")).add(getKeyAsLong(key)); } // Store proper values into the object. object.setValue(BinaryValue.create(serializeTable(values))); StoreValue store = new StoreValue.Builder(object) .withOption(StoreValue.Option.W, wvalue) .withLocation(location) .build(); RiakFuture<StoreValue.Response, Location> future = riakClient.executeAsync(store); try { future.get(transactionTimeLimit, TimeUnit.SECONDS); } catch (TimeoutException e) { if (debug) { System.err.println("Unable to insert key " + key + ". Reason: TIME OUT"); } return TIME_OUT; } catch (Exception e) { if (debug) { System.err.println("Unable to insert key " + key + ". Reason: " + e.toString()); } return Status.ERROR; } return Status.OK; } /** * Auxiliary class needed for object substitution within the update operation. It is a fundamental part of the * fetch-update (locally)-store cycle described by Basho to properly perform a strong-consistent update. */ private static final class UpdateEntity extends UpdateValue.Update<RiakObject> { private final RiakObject object; private UpdateEntity(RiakObject object) { this.object = object; } //Simply returns the object. @Override public RiakObject apply(RiakObject original) { return object; } } /** * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the * record with the specified record key, overwriting any existing values with the same field name. * * @param table The name of the table (Riak bucket) * @param key The record key of the record to write. * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { // If eventual consistency model is in use, then an update operation is pratically equivalent to an insert one. if (!strongConsistency) { return insert(table, key, values); } Location location = new Location(new Namespace(bucketType, table), key); UpdateValue update = new UpdateValue.Builder(location) .withUpdate(new UpdateEntity(new RiakObject().setValue(BinaryValue.create(serializeTable(values))))) .build(); RiakFuture<UpdateValue.Response, Location> future = riakClient.executeAsync(update); try { // For some reason, the update transaction doesn't throw any exception when no cluster has been started, so one // needs to check whether it was done or not. When calling the wasUpdated() function with no nodes available, a // NullPointerException is thrown. // Moreover, such exception could be thrown when more threads are trying to update the same key or, more // generally, when the system is being queried by many clients (i.e. overloaded). This is a known limitation of // Riak KV's strong consistency implementation. future.get(transactionTimeLimit, TimeUnit.SECONDS).wasUpdated(); } catch (TimeoutException e) { if (debug) { System.err.println("Unable to update key " + key + ". Reason: TIME OUT"); } return TIME_OUT; } catch (Exception e) { if (debug) { System.err.println("Unable to update key " + key + ". Reason: " + e.toString()); } return Status.ERROR; } return Status.OK; } /** * Delete a record from the database. * * @param table The name of the table (Riak bucket) * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ @Override public Status delete(String table, String key) { Location location = new Location(new Namespace(bucketType, table), key); DeleteValue dv = new DeleteValue.Builder(location).build(); RiakFuture<Void, Location> future = riakClient.executeAsync(dv); try { future.get(transactionTimeLimit, TimeUnit.SECONDS); } catch (TimeoutException e) { if (debug) { System.err.println("Unable to delete key " + key + ". Reason: TIME OUT"); } return TIME_OUT; } catch (Exception e) { if (debug) { System.err.println("Unable to delete key " + key + ". Reason: " + e.toString()); } return Status.ERROR; } return Status.OK; } public void cleanup() throws DBException { try { riakCluster.shutdown(); } catch (Exception e) { System.err.println("Unable to properly shutdown the cluster. Reason: " + e.toString()); throw new DBException(e); } } /** * Auxiliary function needed for testing. It configures the default bucket-type to take care of the consistency * problem by disallowing the siblings creation. Moreover, it disables strong consistency, because we don't have * the possibility to create a proper bucket-type to use to fake 2i indexes usage. * * @param bucket The bucket name. * @throws Exception Thrown if something bad happens. */ void setTestEnvironment(String bucket) throws Exception { bucketType = "default"; bucketType2i = bucketType; strongConsistency = false; Namespace ns = new Namespace(bucketType, bucket); StoreBucketProperties newBucketProperties = new StoreBucketProperties.Builder(ns).withAllowMulti(false).build(); riakClient.execute(newBucketProperties); } }
23,996
39.263423
120
java
null
NearPMSW-main/baseline/logging/YCSB2/riak/src/main/java/site/ycsb/db/riak/RiakUtils.java
/** * Copyright (c) 2016 YCSB contributors All rights reserved. * Copyright 2014 Basho Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.riak; import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.Set; import com.basho.riak.client.api.commands.kv.FetchValue; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import static com.google.common.base.Preconditions.checkArgument; /** * Utility class for Riak KV Client. * */ final class RiakUtils { private RiakUtils() { super(); } private static byte[] toBytes(final int anInteger) { byte[] aResult = new byte[4]; aResult[0] = (byte) (anInteger >> 24); aResult[1] = (byte) (anInteger >> 16); aResult[2] = (byte) (anInteger >> 8); aResult[3] = (byte) (anInteger /* >> 0 */); return aResult; } private static int fromBytes(final byte[] aByteArray) { checkArgument(aByteArray.length == 4); return (aByteArray[0] << 24) | (aByteArray[1] & 0xFF) << 16 | (aByteArray[2] & 0xFF) << 8 | (aByteArray[3] & 0xFF); } private static void close(final OutputStream anOutputStream) { try { anOutputStream.close(); } catch (IOException e) { e.printStackTrace(); } } private static void close(final InputStream anInputStream) { try { anInputStream.close(); } catch (IOException e) { e.printStackTrace(); } } /** * Serializes a Map, transforming the contained list of (String, ByteIterator) couples into a byte array. * * @param aTable A Map to serialize. * @return A byte array containng the serialized table. */ static byte[] serializeTable(Map<String, ByteIterator> aTable) { final ByteArrayOutputStream anOutputStream = new ByteArrayOutputStream(); final Set<Map.Entry<String, ByteIterator>> theEntries = aTable.entrySet(); try { for (final Map.Entry<String, ByteIterator> anEntry : theEntries) { final byte[] aColumnName = anEntry.getKey().getBytes(); anOutputStream.write(toBytes(aColumnName.length)); anOutputStream.write(aColumnName); final byte[] aColumnValue = anEntry.getValue().toArray(); anOutputStream.write(toBytes(aColumnValue.length)); anOutputStream.write(aColumnValue); } return anOutputStream.toByteArray(); } catch (IOException e) { throw new IllegalStateException(e); } finally { close(anOutputStream); } } /** * Deserializes an input byte array, transforming it into a list of (String, ByteIterator) pairs (i.e. a Map). * * @param aValue A byte array containing the table to deserialize. * @param theResult A Map containing the deserialized table. */ private static void deserializeTable(final byte[] aValue, final Map<String, ByteIterator> theResult) { final ByteArrayInputStream anInputStream = new ByteArrayInputStream(aValue); byte[] aSizeBuffer = new byte[4]; try { while (anInputStream.available() > 0) { anInputStream.read(aSizeBuffer); final int aColumnNameLength = fromBytes(aSizeBuffer); final byte[] aColumnNameBuffer = new byte[aColumnNameLength]; anInputStream.read(aColumnNameBuffer); anInputStream.read(aSizeBuffer); final int aColumnValueLength = fromBytes(aSizeBuffer); final byte[] aColumnValue = new byte[aColumnValueLength]; anInputStream.read(aColumnValue); theResult.put(new String(aColumnNameBuffer), new ByteArrayByteIterator(aColumnValue)); } } catch (Exception e) { throw new IllegalStateException(e); } finally { close(anInputStream); } } /** * Obtains a Long number from a key string. This will be the key used by Riak for all the transactions. * * @param key The key to convert from String to Long. * @return A Long number parsed from the key String. */ static Long getKeyAsLong(String key) { String keyString = key.replaceFirst("[a-zA-Z]*", ""); return Long.parseLong(keyString); } /** * Function that retrieves all the fields searched within a read or scan operation and puts them in the result * HashMap. * * @param fields The list of fields to read, or null for all of them. * @param response A Vector of HashMaps, where each HashMap is a set field/value pairs for one record. * @param resultHashMap The HashMap to return as result. */ static void createResultHashMap(Set<String> fields, FetchValue.Response response, HashMap<String, ByteIterator>resultHashMap) { // If everything went fine, then a result must be given. Such an object is a hash table containing the (field, // value) pairs based on the requested fields. Note that in a read operation, ONLY ONE OBJECT IS RETRIEVED! // The following line retrieves the previously serialized table which was store with an insert transaction. byte[] responseFieldsAndValues = response.getValues().get(0).getValue().getValue(); // Deserialize the stored response table. HashMap<String, ByteIterator> deserializedTable = new HashMap<>(); deserializeTable(responseFieldsAndValues, deserializedTable); // If only specific fields are requested, then only these should be put in the result object! if (fields != null) { // Populate the HashMap to provide as result. for (Object field : fields.toArray()) { // Comparison between a requested field and the ones retrieved. If they're equal (i.e. the get() operation // DOES NOT return a null value), then proceed to store the pair in the resultHashMap. ByteIterator value = deserializedTable.get(field); if (value != null) { resultHashMap.put((String) field, value); } } } else { // If, instead, no field is specified, then all those retrieved must be provided as result. for (String field : deserializedTable.keySet()) { resultHashMap.put(field, deserializedTable.get(field)); } } } }
6,643
34.153439
119
java
null
NearPMSW-main/baseline/logging/YCSB2/infinispan/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2015-2016 YCSB Contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for <a href="http://infinispan.org/">Infinispan</a>. */ package site.ycsb.db;
767
32.391304
72
java
null
NearPMSW-main/baseline/logging/YCSB2/infinispan/src/main/java/site/ycsb/db/RemoteCacheManagerHolder.java
/** * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import java.util.Properties; import org.infinispan.client.hotrod.RemoteCacheManager; /** * Utility class to ensure only a single RemoteCacheManager is created. */ final class RemoteCacheManagerHolder { private static volatile RemoteCacheManager cacheManager = null; private RemoteCacheManagerHolder() { } static RemoteCacheManager getInstance(Properties props) { RemoteCacheManager result = cacheManager; if (result == null) { synchronized (RemoteCacheManagerHolder.class) { result = cacheManager; if (result == null) { result = new RemoteCacheManager(props); cacheManager = new RemoteCacheManager(props); } } } return result; } }
1,407
28.333333
71
java
null
NearPMSW-main/baseline/logging/YCSB2/infinispan/src/main/java/site/ycsb/db/InfinispanClient.java
/** * Copyright (c) 2012-2016 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.infinispan.Cache; import org.infinispan.atomic.AtomicMap; import org.infinispan.atomic.AtomicMapLookup; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.util.logging.Log; import org.infinispan.util.logging.LogFactory; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Vector; /** * This is a client implementation for Infinispan 5.x. */ public class InfinispanClient extends DB { private static final Log LOGGER = LogFactory.getLog(InfinispanClient.class); // An optimisation for clustered mode private final boolean clustered; private EmbeddedCacheManager infinispanManager; public InfinispanClient() { clustered = Boolean.getBoolean("infinispan.clustered"); } public void init() throws DBException { try { infinispanManager = new DefaultCacheManager("infinispan-config.xml"); } catch (IOException e) { throw new DBException(e); } } public void cleanup() { infinispanManager.stop(); infinispanManager = null; } public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { Map<String, String> row; if (clustered) { row = AtomicMapLookup.getAtomicMap(infinispanManager.getCache(table), key, false); } else { Cache<String, Map<String, String>> cache = infinispanManager.getCache(table); row = cache.get(key); } if (row != null) { result.clear(); if (fields == null || fields.isEmpty()) { StringByteIterator.putAllAsByteIterators(result, row); } else { for (String field : fields) { result.put(field, new StringByteIterator(row.get(field))); } } } return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOGGER.warn("Infinispan does not support scan semantics"); return Status.OK; } public Status update(String table, String key, Map<String, ByteIterator> values) { try { if (clustered) { AtomicMap<String, String> row = AtomicMapLookup.getAtomicMap(infinispanManager.getCache(table), key); StringByteIterator.putAllAsStrings(row, values); } else { Cache<String, Map<String, String>> cache = infinispanManager.getCache(table); Map<String, String> row = cache.get(key); if (row == null) { row = StringByteIterator.getStringMap(values); cache.put(key, row); } else { StringByteIterator.putAllAsStrings(row, values); } } return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } public Status insert(String table, String key, Map<String, ByteIterator> values) { try { if (clustered) { AtomicMap<String, String> row = AtomicMapLookup.getAtomicMap(infinispanManager.getCache(table), key); row.clear(); StringByteIterator.putAllAsStrings(row, values); } else { infinispanManager.getCache(table).put(key, values); } return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } public Status delete(String table, String key) { try { if (clustered) { AtomicMapLookup.removeAtomicMap(infinispanManager.getCache(table), key); } else { infinispanManager.getCache(table).remove(key); } return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } }
4,646
29.175325
109
java
null
NearPMSW-main/baseline/logging/YCSB2/infinispan/src/main/java/site/ycsb/db/InfinispanRemoteClient.java
/** * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import site.ycsb.*; import org.infinispan.client.hotrod.RemoteCache; import org.infinispan.client.hotrod.RemoteCacheManager; import org.infinispan.util.logging.Log; import org.infinispan.util.logging.LogFactory; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Vector; /** * This is a client implementation for Infinispan 5.x in client-server mode. */ public class InfinispanRemoteClient extends DB { private static final Log LOGGER = LogFactory.getLog(InfinispanRemoteClient.class); private RemoteCacheManager remoteIspnManager; private String cacheName = null; @Override public void init() throws DBException { remoteIspnManager = RemoteCacheManagerHolder.getInstance(getProperties()); cacheName = getProperties().getProperty("cache"); } @Override public void cleanup() { remoteIspnManager.stop(); remoteIspnManager = null; } @Override public Status insert(String table, String recordKey, Map<String, ByteIterator> values) { String compositKey = createKey(table, recordKey); Map<String, String> stringValues = new HashMap<>(); StringByteIterator.putAllAsStrings(stringValues, values); try { cache().put(compositKey, stringValues); return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status read(String table, String recordKey, Set<String> fields, Map<String, ByteIterator> result) { String compositKey = createKey(table, recordKey); try { Map<String, String> values = cache().get(compositKey); if (values == null || values.isEmpty()) { return Status.NOT_FOUND; } if (fields == null) { //get all field/value pairs StringByteIterator.putAllAsByteIterators(result, values); } else { for (String field : fields) { String value = values.get(field); if (value != null) { result.put(field, new StringByteIterator(value)); } } } return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOGGER.warn("Infinispan does not support scan semantics"); return Status.NOT_IMPLEMENTED; } @Override public Status update(String table, String recordKey, Map<String, ByteIterator> values) { String compositKey = createKey(table, recordKey); try { Map<String, String> stringValues = new HashMap<>(); StringByteIterator.putAllAsStrings(stringValues, values); cache().put(compositKey, stringValues); return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } @Override public Status delete(String table, String recordKey) { String compositKey = createKey(table, recordKey); try { cache().remove(compositKey); return Status.OK; } catch (Exception e) { LOGGER.error(e); return Status.ERROR; } } private RemoteCache<String, Map<String, String>> cache() { if (this.cacheName != null) { return remoteIspnManager.getCache(cacheName); } else { return remoteIspnManager.getCache(); } } private String createKey(String table, String recordKey) { return table + "-" + recordKey; } }
4,164
28.75
108
java
null
NearPMSW-main/baseline/logging/YCSB2/rocksdb/src/test/java/site/ycsb/db/rocksdb/RocksDBClientTest.java
/* * Copyright (c) 2018 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.rocksdb; import site.ycsb.ByteIterator; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import org.junit.*; import org.junit.rules.TemporaryFolder; import java.util.*; import static org.junit.Assert.assertEquals; public class RocksDBClientTest { @Rule public TemporaryFolder tmpFolder = new TemporaryFolder(); private static final String MOCK_TABLE = "ycsb"; private static final String MOCK_KEY0 = "0"; private static final String MOCK_KEY1 = "1"; private static final String MOCK_KEY2 = "2"; private static final String MOCK_KEY3 = "3"; private static final int NUM_RECORDS = 10; private static final String FIELD_PREFIX = CoreWorkload.FIELD_NAME_PREFIX_DEFAULT; private static final Map<String, ByteIterator> MOCK_DATA; static { MOCK_DATA = new HashMap<>(NUM_RECORDS); for (int i = 0; i < NUM_RECORDS; i++) { MOCK_DATA.put(FIELD_PREFIX + i, new StringByteIterator("value" + i)); } } private RocksDBClient instance; @Before public void setup() throws Exception { instance = new RocksDBClient(); final Properties properties = new Properties(); properties.setProperty(RocksDBClient.PROPERTY_ROCKSDB_DIR, tmpFolder.getRoot().getAbsolutePath()); instance.setProperties(properties); instance.init(); } @After public void tearDown() throws Exception { instance.cleanup(); } @Test public void insertAndRead() throws Exception { final Status insertResult = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); assertEquals(Status.OK, insertResult); final Set<String> fields = MOCK_DATA.keySet(); final Map<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); final Status readResult = instance.read(MOCK_TABLE, MOCK_KEY0, fields, resultParam); assertEquals(Status.OK, readResult); } @Test public void insertAndDelete() throws Exception { final Status insertResult = instance.insert(MOCK_TABLE, MOCK_KEY1, MOCK_DATA); assertEquals(Status.OK, insertResult); final Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); assertEquals(Status.OK, result); } @Test public void insertUpdateAndRead() throws Exception { final Map<String, ByteIterator> newValues = new HashMap<>(NUM_RECORDS); final Status insertResult = instance.insert(MOCK_TABLE, MOCK_KEY2, MOCK_DATA); assertEquals(Status.OK, insertResult); for (int i = 0; i < NUM_RECORDS; i++) { newValues.put(FIELD_PREFIX + i, new StringByteIterator("newvalue" + i)); } final Status result = instance.update(MOCK_TABLE, MOCK_KEY2, newValues); assertEquals(Status.OK, result); //validate that the values changed final Map<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); instance.read(MOCK_TABLE, MOCK_KEY2, MOCK_DATA.keySet(), resultParam); for (int i = 0; i < NUM_RECORDS; i++) { assertEquals("newvalue" + i, resultParam.get(FIELD_PREFIX + i).toString()); } } @Test public void insertAndScan() throws Exception { final Status insertResult = instance.insert(MOCK_TABLE, MOCK_KEY3, MOCK_DATA); assertEquals(Status.OK, insertResult); final Set<String> fields = MOCK_DATA.keySet(); final Vector<HashMap<String, ByteIterator>> resultParam = new Vector<>(NUM_RECORDS); final Status result = instance.scan(MOCK_TABLE, MOCK_KEY3, NUM_RECORDS, fields, resultParam); assertEquals(Status.OK, result); } }
4,146
32.443548
102
java
null
NearPMSW-main/baseline/logging/YCSB2/rocksdb/src/test/java/site/ycsb/db/rocksdb/RocksDBOptionsFileTest.java
/* * Copyright (c) 2019 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.rocksdb; import org.junit.*; import org.junit.rules.TemporaryFolder; import org.rocksdb.*; import java.util.*; import static org.junit.Assert.assertEquals; public class RocksDBOptionsFileTest { @Rule public TemporaryFolder tmpFolder = new TemporaryFolder(); private RocksDBClient instance; @Test public void loadOptionsFromFile() throws Exception { final String optionsPath = RocksDBClient.class.getClassLoader().getResource("testcase.ini").getPath(); final String dbPath = tmpFolder.getRoot().getAbsolutePath(); initDbWithOptionsFile(dbPath, optionsPath); checkOptions(dbPath); } private void initDbWithOptionsFile(final String dbPath, final String optionsPath) throws Exception { instance = new RocksDBClient(); final Properties properties = new Properties(); properties.setProperty(RocksDBClient.PROPERTY_ROCKSDB_DIR, dbPath); properties.setProperty(RocksDBClient.PROPERTY_ROCKSDB_OPTIONS_FILE, optionsPath); instance.setProperties(properties); instance.init(); instance.cleanup(); } private void checkOptions(final String dbPath) throws Exception { final List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); final DBOptions dbOptions = new DBOptions(); RocksDB.loadLibrary(); OptionsUtil.loadLatestOptions(dbPath, Env.getDefault(), dbOptions, cfDescriptors); try { assertEquals(dbOptions.walSizeLimitMB(), 42); // the two CFs should be "default" and "usertable" assertEquals(cfDescriptors.size(), 2); assertEquals(cfDescriptors.get(0).getOptions().ttl(), 42); assertEquals(cfDescriptors.get(1).getOptions().ttl(), 42); } finally { dbOptions.close(); } } };
2,398
30.565789
106
java
null
NearPMSW-main/baseline/logging/YCSB2/rocksdb/src/main/java/site/ycsb/db/rocksdb/package-info.java
/* * Copyright (c) 2018 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The RocksDB Java binding for <a href="http://rocksdb.org/">RocksDB</a>. */ package site.ycsb.db.rocksdb;
772
32.608696
74
java
null
NearPMSW-main/baseline/logging/YCSB2/rocksdb/src/main/java/site/ycsb/db/rocksdb/RocksDBClient.java
/* * Copyright (c) 2018 - 2019 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db.rocksdb; import site.ycsb.*; import site.ycsb.Status; import net.jcip.annotations.GuardedBy; import org.rocksdb.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.nio.ByteBuffer; import java.nio.file.*; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import static java.nio.charset.StandardCharsets.UTF_8; /** * RocksDB binding for <a href="http://rocksdb.org/">RocksDB</a>. * * See {@code rocksdb/README.md} for details. */ public class RocksDBClient extends DB { static final String PROPERTY_ROCKSDB_DIR = "rocksdb.dir"; static final String PROPERTY_ROCKSDB_OPTIONS_FILE = "rocksdb.optionsfile"; private static final String COLUMN_FAMILY_NAMES_FILENAME = "CF_NAMES"; private static final Logger LOGGER = LoggerFactory.getLogger(RocksDBClient.class); @GuardedBy("RocksDBClient.class") private static Path rocksDbDir = null; @GuardedBy("RocksDBClient.class") private static Path optionsFile = null; @GuardedBy("RocksDBClient.class") private static RocksObject dbOptions = null; @GuardedBy("RocksDBClient.class") private static RocksDB rocksDb = null; @GuardedBy("RocksDBClient.class") private static int references = 0; private static final ConcurrentMap<String, ColumnFamily> COLUMN_FAMILIES = new ConcurrentHashMap<>(); private static final ConcurrentMap<String, Lock> COLUMN_FAMILY_LOCKS = new ConcurrentHashMap<>(); @Override public void init() throws DBException { synchronized(RocksDBClient.class) { if(rocksDb == null) { rocksDbDir = Paths.get(getProperties().getProperty(PROPERTY_ROCKSDB_DIR)); LOGGER.info("RocksDB data dir: " + rocksDbDir); String optionsFileString = getProperties().getProperty(PROPERTY_ROCKSDB_OPTIONS_FILE); if (optionsFileString != null) { optionsFile = Paths.get(optionsFileString); LOGGER.info("RocksDB options file: " + optionsFile); } try { if (optionsFile != null) { rocksDb = initRocksDBWithOptionsFile(); } else { rocksDb = initRocksDB(); } } catch (final IOException | RocksDBException e) { throw new DBException(e); } } references++; } } /** * Initializes and opens the RocksDB database. * * Should only be called with a {@code synchronized(RocksDBClient.class)` block}. * * @return The initialized and open RocksDB instance. */ private RocksDB initRocksDBWithOptionsFile() throws IOException, RocksDBException { if(!Files.exists(rocksDbDir)) { Files.createDirectories(rocksDbDir); } final DBOptions options = new DBOptions(); final List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); final List<ColumnFamilyHandle> cfHandles = new ArrayList<>(); RocksDB.loadLibrary(); OptionsUtil.loadOptionsFromFile(optionsFile.toAbsolutePath().toString(), Env.getDefault(), options, cfDescriptors); dbOptions = options; final RocksDB db = RocksDB.open(options, rocksDbDir.toAbsolutePath().toString(), cfDescriptors, cfHandles); for(int i = 0; i < cfDescriptors.size(); i++) { String cfName = new String(cfDescriptors.get(i).getName()); final ColumnFamilyHandle cfHandle = cfHandles.get(i); final ColumnFamilyOptions cfOptions = cfDescriptors.get(i).getOptions(); COLUMN_FAMILIES.put(cfName, new ColumnFamily(cfHandle, cfOptions)); } return db; } /** * Initializes and opens the RocksDB database. * * Should only be called with a {@code synchronized(RocksDBClient.class)` block}. * * @return The initialized and open RocksDB instance. */ private RocksDB initRocksDB() throws IOException, RocksDBException { if(!Files.exists(rocksDbDir)) { Files.createDirectories(rocksDbDir); } final List<String> cfNames = loadColumnFamilyNames(); final List<ColumnFamilyOptions> cfOptionss = new ArrayList<>(); final List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); for(final String cfName : cfNames) { final ColumnFamilyOptions cfOptions = new ColumnFamilyOptions() .optimizeLevelStyleCompaction(); final ColumnFamilyDescriptor cfDescriptor = new ColumnFamilyDescriptor( cfName.getBytes(UTF_8), cfOptions ); cfOptionss.add(cfOptions); cfDescriptors.add(cfDescriptor); } final int rocksThreads = Runtime.getRuntime().availableProcessors() * 2; if(cfDescriptors.isEmpty()) { final Options options = new Options() .optimizeLevelStyleCompaction() .setCreateIfMissing(true) .setCreateMissingColumnFamilies(true) .setIncreaseParallelism(rocksThreads) .setMaxBackgroundCompactions(rocksThreads) .setInfoLogLevel(InfoLogLevel.INFO_LEVEL); dbOptions = options; return RocksDB.open(options, rocksDbDir.toAbsolutePath().toString()); } else { final DBOptions options = new DBOptions() .setCreateIfMissing(true) .setCreateMissingColumnFamilies(true) .setIncreaseParallelism(rocksThreads) .setMaxBackgroundCompactions(rocksThreads) .setInfoLogLevel(InfoLogLevel.INFO_LEVEL); dbOptions = options; final List<ColumnFamilyHandle> cfHandles = new ArrayList<>(); final RocksDB db = RocksDB.open(options, rocksDbDir.toAbsolutePath().toString(), cfDescriptors, cfHandles); for(int i = 0; i < cfNames.size(); i++) { COLUMN_FAMILIES.put(cfNames.get(i), new ColumnFamily(cfHandles.get(i), cfOptionss.get(i))); } return db; } } @Override public void cleanup() throws DBException { super.cleanup(); synchronized (RocksDBClient.class) { try { if (references == 1) { for (final ColumnFamily cf : COLUMN_FAMILIES.values()) { cf.getHandle().close(); } rocksDb.close(); rocksDb = null; dbOptions.close(); dbOptions = null; for (final ColumnFamily cf : COLUMN_FAMILIES.values()) { cf.getOptions().close(); } saveColumnFamilyNames(); COLUMN_FAMILIES.clear(); rocksDbDir = null; } } catch (final IOException e) { throw new DBException(e); } finally { references--; } } } @Override public Status read(final String table, final String key, final Set<String> fields, final Map<String, ByteIterator> result) { try { if (!COLUMN_FAMILIES.containsKey(table)) { createColumnFamily(table); } final ColumnFamilyHandle cf = COLUMN_FAMILIES.get(table).getHandle(); final byte[] values = rocksDb.get(cf, key.getBytes(UTF_8)); if(values == null) { return Status.NOT_FOUND; } deserializeValues(values, fields, result); return Status.OK; } catch(final RocksDBException e) { LOGGER.error(e.getMessage(), e); return Status.ERROR; } } @Override public Status scan(final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { try { if (!COLUMN_FAMILIES.containsKey(table)) { createColumnFamily(table); } final ColumnFamilyHandle cf = COLUMN_FAMILIES.get(table).getHandle(); try(final RocksIterator iterator = rocksDb.newIterator(cf)) { int iterations = 0; for (iterator.seek(startkey.getBytes(UTF_8)); iterator.isValid() && iterations < recordcount; iterator.next()) { final HashMap<String, ByteIterator> values = new HashMap<>(); deserializeValues(iterator.value(), fields, values); result.add(values); iterations++; } } return Status.OK; } catch(final RocksDBException e) { LOGGER.error(e.getMessage(), e); return Status.ERROR; } } @Override public Status update(final String table, final String key, final Map<String, ByteIterator> values) { //TODO(AR) consider if this would be faster with merge operator try { if (!COLUMN_FAMILIES.containsKey(table)) { createColumnFamily(table); } final ColumnFamilyHandle cf = COLUMN_FAMILIES.get(table).getHandle(); final Map<String, ByteIterator> result = new HashMap<>(); final byte[] currentValues = rocksDb.get(cf, key.getBytes(UTF_8)); if(currentValues == null) { return Status.NOT_FOUND; } deserializeValues(currentValues, null, result); //update result.putAll(values); //store rocksDb.put(cf, key.getBytes(UTF_8), serializeValues(result)); return Status.OK; } catch(final RocksDBException | IOException e) { LOGGER.error(e.getMessage(), e); return Status.ERROR; } } @Override public Status insert(final String table, final String key, final Map<String, ByteIterator> values) { try { if (!COLUMN_FAMILIES.containsKey(table)) { createColumnFamily(table); } final ColumnFamilyHandle cf = COLUMN_FAMILIES.get(table).getHandle(); rocksDb.put(cf, key.getBytes(UTF_8), serializeValues(values)); return Status.OK; } catch(final RocksDBException | IOException e) { LOGGER.error(e.getMessage(), e); return Status.ERROR; } } @Override public Status delete(final String table, final String key) { try { if (!COLUMN_FAMILIES.containsKey(table)) { createColumnFamily(table); } final ColumnFamilyHandle cf = COLUMN_FAMILIES.get(table).getHandle(); rocksDb.delete(cf, key.getBytes(UTF_8)); return Status.OK; } catch(final RocksDBException e) { LOGGER.error(e.getMessage(), e); return Status.ERROR; } } private void saveColumnFamilyNames() throws IOException { final Path file = rocksDbDir.resolve(COLUMN_FAMILY_NAMES_FILENAME); try(final PrintWriter writer = new PrintWriter(Files.newBufferedWriter(file, UTF_8))) { writer.println(new String(RocksDB.DEFAULT_COLUMN_FAMILY, UTF_8)); for(final String cfName : COLUMN_FAMILIES.keySet()) { writer.println(cfName); } } } private List<String> loadColumnFamilyNames() throws IOException { final List<String> cfNames = new ArrayList<>(); final Path file = rocksDbDir.resolve(COLUMN_FAMILY_NAMES_FILENAME); if(Files.exists(file)) { try (final LineNumberReader reader = new LineNumberReader(Files.newBufferedReader(file, UTF_8))) { String line = null; while ((line = reader.readLine()) != null) { cfNames.add(line); } } } return cfNames; } private Map<String, ByteIterator> deserializeValues(final byte[] values, final Set<String> fields, final Map<String, ByteIterator> result) { final ByteBuffer buf = ByteBuffer.allocate(4); int offset = 0; while(offset < values.length) { buf.put(values, offset, 4); buf.flip(); final int keyLen = buf.getInt(); buf.clear(); offset += 4; final String key = new String(values, offset, keyLen); offset += keyLen; buf.put(values, offset, 4); buf.flip(); final int valueLen = buf.getInt(); buf.clear(); offset += 4; if(fields == null || fields.contains(key)) { result.put(key, new ByteArrayByteIterator(values, offset, valueLen)); } offset += valueLen; } return result; } private byte[] serializeValues(final Map<String, ByteIterator> values) throws IOException { try(final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { final ByteBuffer buf = ByteBuffer.allocate(4); for(final Map.Entry<String, ByteIterator> value : values.entrySet()) { final byte[] keyBytes = value.getKey().getBytes(UTF_8); final byte[] valueBytes = value.getValue().toArray(); buf.putInt(keyBytes.length); baos.write(buf.array()); baos.write(keyBytes); buf.clear(); buf.putInt(valueBytes.length); baos.write(buf.array()); baos.write(valueBytes); buf.clear(); } return baos.toByteArray(); } } private ColumnFamilyOptions getDefaultColumnFamilyOptions(final String destinationCfName) { final ColumnFamilyOptions cfOptions; if (COLUMN_FAMILIES.containsKey("default")) { LOGGER.warn("no column family options for \"" + destinationCfName + "\" " + "in options file - using options from \"default\""); cfOptions = COLUMN_FAMILIES.get("default").getOptions(); } else { LOGGER.warn("no column family options for either \"" + destinationCfName + "\" or " + "\"default\" in options file - initializing with empty configuration"); cfOptions = new ColumnFamilyOptions(); } LOGGER.warn("Add a CFOptions section for \"" + destinationCfName + "\" to the options file, " + "or subsequent runs on this DB will fail."); return cfOptions; } private void createColumnFamily(final String name) throws RocksDBException { COLUMN_FAMILY_LOCKS.putIfAbsent(name, new ReentrantLock()); final Lock l = COLUMN_FAMILY_LOCKS.get(name); l.lock(); try { if(!COLUMN_FAMILIES.containsKey(name)) { final ColumnFamilyOptions cfOptions; if (optionsFile != null) { // RocksDB requires all options files to include options for the "default" column family; // apply those options to this column family cfOptions = getDefaultColumnFamilyOptions(name); } else { cfOptions = new ColumnFamilyOptions().optimizeLevelStyleCompaction(); } final ColumnFamilyHandle cfHandle = rocksDb.createColumnFamily( new ColumnFamilyDescriptor(name.getBytes(UTF_8), cfOptions) ); COLUMN_FAMILIES.put(name, new ColumnFamily(cfHandle, cfOptions)); } } finally { l.unlock(); } } private static final class ColumnFamily { private final ColumnFamilyHandle handle; private final ColumnFamilyOptions options; private ColumnFamily(final ColumnFamilyHandle handle, final ColumnFamilyOptions options) { this.handle = handle; this.options = options; } public ColumnFamilyHandle getHandle() { return handle; } public ColumnFamilyOptions getOptions() { return options; } } }
15,353
31.807692
119
java
null
NearPMSW-main/baseline/logging/YCSB2/memcached/src/main/java/site/ycsb/db/package-info.java
/** * Copyright (c) 2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * YCSB binding for memcached. */ package site.ycsb.db;
720
31.772727
70
java
null
NearPMSW-main/baseline/logging/YCSB2/memcached/src/main/java/site/ycsb/db/MemcachedClient.java
/** * Copyright (c) 2014-2015 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.net.InetSocketAddress; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Vector; import net.spy.memcached.ConnectionFactoryBuilder; import net.spy.memcached.FailureMode; // We also use `net.spy.memcached.MemcachedClient`; it is not imported // explicitly and referred to with its full path to avoid conflicts with the // class of the same name in this file. import net.spy.memcached.internal.GetFuture; import net.spy.memcached.internal.OperationFuture; import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.ObjectNode; import org.apache.log4j.Logger; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Concrete Memcached client implementation. */ public class MemcachedClient extends DB { private final Logger logger = Logger.getLogger(getClass()); protected static final ObjectMapper MAPPER = new ObjectMapper(); private boolean checkOperationStatus; private long shutdownTimeoutMillis; private int objectExpirationTime; public static final String HOSTS_PROPERTY = "memcached.hosts"; public static final int DEFAULT_PORT = 11211; private static final String TEMPORARY_FAILURE_MSG = "Temporary failure"; private static final String CANCELLED_MSG = "cancelled"; public static final String SHUTDOWN_TIMEOUT_MILLIS_PROPERTY = "memcached.shutdownTimeoutMillis"; public static final String DEFAULT_SHUTDOWN_TIMEOUT_MILLIS = "30000"; public static final String OBJECT_EXPIRATION_TIME_PROPERTY = "memcached.objectExpirationTime"; public static final String DEFAULT_OBJECT_EXPIRATION_TIME = String.valueOf(Integer.MAX_VALUE); public static final String CHECK_OPERATION_STATUS_PROPERTY = "memcached.checkOperationStatus"; public static final String CHECK_OPERATION_STATUS_DEFAULT = "true"; public static final String READ_BUFFER_SIZE_PROPERTY = "memcached.readBufferSize"; public static final String DEFAULT_READ_BUFFER_SIZE = "3000000"; public static final String OP_TIMEOUT_PROPERTY = "memcached.opTimeoutMillis"; public static final String DEFAULT_OP_TIMEOUT = "60000"; public static final String FAILURE_MODE_PROPERTY = "memcached.failureMode"; public static final FailureMode FAILURE_MODE_PROPERTY_DEFAULT = FailureMode.Redistribute; public static final String PROTOCOL_PROPERTY = "memcached.protocol"; public static final ConnectionFactoryBuilder.Protocol DEFAULT_PROTOCOL = ConnectionFactoryBuilder.Protocol.TEXT; /** * The MemcachedClient implementation that will be used to communicate * with the memcached server. */ private net.spy.memcached.MemcachedClient client; /** * @returns Underlying Memcached protocol client, implemented by * SpyMemcached. */ protected net.spy.memcached.MemcachedClient memcachedClient() { return client; } @Override public void init() throws DBException { try { client = createMemcachedClient(); checkOperationStatus = Boolean.parseBoolean( getProperties().getProperty(CHECK_OPERATION_STATUS_PROPERTY, CHECK_OPERATION_STATUS_DEFAULT)); objectExpirationTime = Integer.parseInt( getProperties().getProperty(OBJECT_EXPIRATION_TIME_PROPERTY, DEFAULT_OBJECT_EXPIRATION_TIME)); shutdownTimeoutMillis = Integer.parseInt( getProperties().getProperty(SHUTDOWN_TIMEOUT_MILLIS_PROPERTY, DEFAULT_SHUTDOWN_TIMEOUT_MILLIS)); } catch (Exception e) { throw new DBException(e); } } protected net.spy.memcached.MemcachedClient createMemcachedClient() throws Exception { ConnectionFactoryBuilder connectionFactoryBuilder = new ConnectionFactoryBuilder(); connectionFactoryBuilder.setReadBufferSize(Integer.parseInt( getProperties().getProperty(READ_BUFFER_SIZE_PROPERTY, DEFAULT_READ_BUFFER_SIZE))); connectionFactoryBuilder.setOpTimeout(Integer.parseInt( getProperties().getProperty(OP_TIMEOUT_PROPERTY, DEFAULT_OP_TIMEOUT))); String protocolString = getProperties().getProperty(PROTOCOL_PROPERTY); connectionFactoryBuilder.setProtocol( protocolString == null ? DEFAULT_PROTOCOL : ConnectionFactoryBuilder.Protocol.valueOf(protocolString.toUpperCase())); String failureString = getProperties().getProperty(FAILURE_MODE_PROPERTY); connectionFactoryBuilder.setFailureMode( failureString == null ? FAILURE_MODE_PROPERTY_DEFAULT : FailureMode.valueOf(failureString)); // Note: this only works with IPv4 addresses due to its assumption of // ":" being the separator of hostname/IP and port; this is not the case // when dealing with IPv6 addresses. // // TODO(mbrukman): fix this. List<InetSocketAddress> addresses = new ArrayList<InetSocketAddress>(); String[] hosts = getProperties().getProperty(HOSTS_PROPERTY).split(","); for (String address : hosts) { int colon = address.indexOf(":"); int port = DEFAULT_PORT; String host = address; if (colon != -1) { port = Integer.parseInt(address.substring(colon + 1)); host = address.substring(0, colon); } addresses.add(new InetSocketAddress(host, port)); } return new net.spy.memcached.MemcachedClient( connectionFactoryBuilder.build(), addresses); } @Override public Status read( String table, String key, Set<String> fields, Map<String, ByteIterator> result) { key = createQualifiedKey(table, key); try { GetFuture<Object> future = memcachedClient().asyncGet(key); Object document = future.get(); if (document != null) { fromJson((String) document, fields, result); } return Status.OK; } catch (Exception e) { logger.error("Error encountered for key: " + key, e); return Status.ERROR; } } @Override public Status scan( String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result){ return Status.NOT_IMPLEMENTED; } @Override public Status update( String table, String key, Map<String, ByteIterator> values) { key = createQualifiedKey(table, key); try { OperationFuture<Boolean> future = memcachedClient().replace(key, objectExpirationTime, toJson(values)); return getReturnCode(future); } catch (Exception e) { logger.error("Error updating value with key: " + key, e); return Status.ERROR; } } @Override public Status insert( String table, String key, Map<String, ByteIterator> values) { key = createQualifiedKey(table, key); try { OperationFuture<Boolean> future = memcachedClient().add(key, objectExpirationTime, toJson(values)); return getReturnCode(future); } catch (Exception e) { logger.error("Error inserting value", e); return Status.ERROR; } } @Override public Status delete(String table, String key) { key = createQualifiedKey(table, key); try { OperationFuture<Boolean> future = memcachedClient().delete(key); return getReturnCode(future); } catch (Exception e) { logger.error("Error deleting value", e); return Status.ERROR; } } protected Status getReturnCode(OperationFuture<Boolean> future) { if (!checkOperationStatus) { return Status.OK; } if (future.getStatus().isSuccess()) { return Status.OK; } else if (TEMPORARY_FAILURE_MSG.equals(future.getStatus().getMessage())) { return new Status("TEMPORARY_FAILURE", TEMPORARY_FAILURE_MSG); } else if (CANCELLED_MSG.equals(future.getStatus().getMessage())) { return new Status("CANCELLED_MSG", CANCELLED_MSG); } return new Status("ERROR", future.getStatus().getMessage()); } @Override public void cleanup() throws DBException { if (client != null) { memcachedClient().shutdown(shutdownTimeoutMillis, MILLISECONDS); } } protected static String createQualifiedKey(String table, String key) { return MessageFormat.format("{0}-{1}", table, key); } protected static void fromJson( String value, Set<String> fields, Map<String, ByteIterator> result) throws IOException { JsonNode json = MAPPER.readTree(value); boolean checkFields = fields != null && !fields.isEmpty(); for (Iterator<Map.Entry<String, JsonNode>> jsonFields = json.getFields(); jsonFields.hasNext(); /* increment in loop body */) { Map.Entry<String, JsonNode> jsonField = jsonFields.next(); String name = jsonField.getKey(); if (checkFields && !fields.contains(name)) { continue; } JsonNode jsonValue = jsonField.getValue(); if (jsonValue != null && !jsonValue.isNull()) { result.put(name, new StringByteIterator(jsonValue.asText())); } } } protected static String toJson(Map<String, ByteIterator> values) throws IOException { ObjectNode node = MAPPER.createObjectNode(); Map<String, String> stringMap = StringByteIterator.getStringMap(values); for (Map.Entry<String, String> pair : stringMap.entrySet()) { node.put(pair.getKey(), pair.getValue()); } JsonFactory jsonFactory = new JsonFactory(); Writer writer = new StringWriter(); JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(writer); MAPPER.writeTree(jsonGenerator, node); return writer.toString(); } }
10,775
34.447368
100
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch/src/test/java/site/ycsb/db/ElasticsearchClientTest.java
/** * Copyright (c) 2012-2017 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package site.ycsb.db; import site.ycsb.ByteIterator; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import site.ycsb.workloads.CoreWorkload; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.util.HashMap; import java.util.Properties; import java.util.Set; import java.util.Vector; import static org.junit.Assert.assertEquals; public class ElasticsearchClientTest { @ClassRule public final static TemporaryFolder temp = new TemporaryFolder(); private final static ElasticsearchClient instance = new ElasticsearchClient(); private final static HashMap<String, ByteIterator> MOCK_DATA; private final static String MOCK_TABLE = "MOCK_TABLE"; private final static String MOCK_KEY0 = "0"; private final static String MOCK_KEY1 = "1"; private final static String MOCK_KEY2 = "2"; private final static String FIELD_PREFIX = CoreWorkload.FIELD_NAME_PREFIX_DEFAULT; static { MOCK_DATA = new HashMap<>(10); for (int i = 1; i <= 10; i++) { MOCK_DATA.put(FIELD_PREFIX + i, new StringByteIterator("value" + i)); } } @BeforeClass public static void setUpClass() throws DBException { final Properties props = new Properties(); props.put("path.home", temp.getRoot().toString()); instance.setProperties(props); instance.init(); } @AfterClass public static void tearDownClass() throws DBException { instance.cleanup(); } @Before public void setUp() { instance.insert(MOCK_TABLE, MOCK_KEY1, MOCK_DATA); instance.insert(MOCK_TABLE, MOCK_KEY2, MOCK_DATA); } @After public void tearDown() { instance.delete(MOCK_TABLE, MOCK_KEY1); instance.delete(MOCK_TABLE, MOCK_KEY2); } /** * Test of insert method, of class ElasticsearchClient. */ @Test public void testInsert() { Status result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); assertEquals(Status.OK, result); } /** * Test of delete method, of class ElasticsearchClient. */ @Test public void testDelete() { Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); assertEquals(Status.OK, result); } /** * Test of read method, of class ElasticsearchClient. */ @Test public void testRead() { Set<String> fields = MOCK_DATA.keySet(); HashMap<String, ByteIterator> resultParam = new HashMap<>(10); Status result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); assertEquals(Status.OK, result); } /** * Test of update method, of class ElasticsearchClient. */ @Test public void testUpdate() { int i; HashMap<String, ByteIterator> newValues = new HashMap<>(10); for (i = 1; i <= 10; i++) { newValues.put(FIELD_PREFIX + i, new StringByteIterator("newvalue" + i)); } Status result = instance.update(MOCK_TABLE, MOCK_KEY1, newValues); assertEquals(Status.OK, result); //validate that the values changed HashMap<String, ByteIterator> resultParam = new HashMap<>(10); instance.read(MOCK_TABLE, MOCK_KEY1, MOCK_DATA.keySet(), resultParam); for (i = 1; i <= 10; i++) { assertEquals("newvalue" + i, resultParam.get(FIELD_PREFIX + i).toString()); } } /** * Test of scan method, of class ElasticsearchClient. */ @Test public void testScan() { int recordcount = 10; Set<String> fields = MOCK_DATA.keySet(); Vector<HashMap<String, ByteIterator>> resultParam = new Vector<>(10); Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, recordcount, fields, resultParam); assertEquals(Status.OK, result); } }
4,761
30.328947
95
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ /** * The YCSB binding for * <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a>. */ package site.ycsb.db;
787
31.833333
77
java
null
NearPMSW-main/baseline/logging/YCSB2/elasticsearch/src/main/java/site/ycsb/db/ElasticsearchClient.java
/** * Copyright (c) 2012 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import static org.elasticsearch.common.settings.Settings.Builder; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; import static org.elasticsearch.node.NodeBuilder.nodeBuilder; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; import site.ycsb.StringByteIterator; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch.client.Requests; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.node.Node; import org.elasticsearch.search.SearchHit; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.Vector; /** * Elasticsearch client for YCSB framework. * * <p> * Default properties to set: * </p> * <ul> * <li>cluster.name = es.ycsb.cluster * <li>es.index.key = es.ycsb * <li>es.number_of_shards = 1 * <li>es.number_of_replicas = 0 * </ul> */ public class ElasticsearchClient extends DB { private static final String DEFAULT_CLUSTER_NAME = "es.ycsb.cluster"; private static final String DEFAULT_INDEX_KEY = "es.ycsb"; private static final String DEFAULT_REMOTE_HOST = "localhost:9300"; private static final int NUMBER_OF_SHARDS = 1; private static final int NUMBER_OF_REPLICAS = 0; private Node node; private Client client; private String indexKey; private Boolean remoteMode; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ @Override public void init() throws DBException { final Properties props = getProperties(); // Check if transport client needs to be used (To connect to multiple // elasticsearch nodes) remoteMode = Boolean.parseBoolean(props.getProperty("es.remote", "false")); final String pathHome = props.getProperty("path.home"); // when running in embedded mode, require path.home if (!remoteMode && (pathHome == null || pathHome.isEmpty())) { throw new IllegalArgumentException("path.home must be specified when running in embedded mode"); } this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY); int numberOfShards = parseIntegerProperty(props, "es.number_of_shards", NUMBER_OF_SHARDS); int numberOfReplicas = parseIntegerProperty(props, "es.number_of_replicas", NUMBER_OF_REPLICAS); Boolean newdb = Boolean.parseBoolean(props.getProperty("es.newdb", "false")); Builder settings = Settings.settingsBuilder() .put("cluster.name", DEFAULT_CLUSTER_NAME) .put("node.local", Boolean.toString(!remoteMode)) .put("path.home", pathHome); // if properties file contains elasticsearch user defined properties // add it to the settings file (will overwrite the defaults). settings.put(props); final String clusterName = settings.get("cluster.name"); System.err.println("Elasticsearch starting node = " + clusterName); System.err.println("Elasticsearch node path.home = " + settings.get("path.home")); System.err.println("Elasticsearch Remote Mode = " + remoteMode); // Remote mode support for connecting to remote elasticsearch cluster if (remoteMode) { settings.put("client.transport.sniff", true) .put("client.transport.ignore_cluster_name", false) .put("client.transport.ping_timeout", "30s") .put("client.transport.nodes_sampler_interval", "30s"); // Default it to localhost:9300 String[] nodeList = props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST).split(","); System.out.println("Elasticsearch Remote Hosts = " + props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST)); TransportClient tClient = TransportClient.builder().settings(settings).build(); for (String h : nodeList) { String[] nodes = h.split(":"); try { tClient.addTransportAddress(new InetSocketTransportAddress( InetAddress.getByName(nodes[0]), Integer.parseInt(nodes[1]) )); } catch (NumberFormatException e) { throw new IllegalArgumentException("Unable to parse port number.", e); } catch (UnknownHostException e) { throw new IllegalArgumentException("Unable to Identify host.", e); } } client = tClient; } else { // Start node only if transport client mode is disabled node = nodeBuilder().clusterName(clusterName).settings(settings).node(); node.start(); client = node.client(); } final boolean exists = client.admin().indices() .exists(Requests.indicesExistsRequest(indexKey)).actionGet() .isExists(); if (exists && newdb) { client.admin().indices().prepareDelete(indexKey).execute().actionGet(); } if (!exists || newdb) { client.admin().indices().create( new CreateIndexRequest(indexKey) .settings( Settings.builder() .put("index.number_of_shards", numberOfShards) .put("index.number_of_replicas", numberOfReplicas) .put("index.mapping._id.indexed", true) )).actionGet(); } client.admin().cluster().health(new ClusterHealthRequest().waitForGreenStatus()).actionGet(); } private int parseIntegerProperty(Properties properties, String key, int defaultValue) { String value = properties.getProperty(key); return value == null ? defaultValue : Integer.parseInt(value); } @Override public void cleanup() throws DBException { if (!remoteMode) { if (!node.isClosed()) { client.close(); node.close(); } } else { client.close(); } } /** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error. See this class's * description for a discussion of error codes. */ @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { try { final XContentBuilder doc = jsonBuilder().startObject(); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { doc.field(entry.getKey(), entry.getValue()); } doc.endObject(); client.prepareIndex(indexKey, table, key).setSource(doc).execute().actionGet(); return Status.OK; } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } /** * Delete a record from the database. * * @param table * The name of the table * @param key * The record key of the record to delete. * @return Zero on success, a non-zero error code on error. See this class's * description for a discussion of error codes. */ @Override public Status delete(String table, String key) { try { DeleteResponse response = client.prepareDelete(indexKey, table, key).execute().actionGet(); if (response.isFound()) { return Status.OK; } else { return Status.NOT_FOUND; } } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } /** * Read a record from the database. Each field/value pair from the result will * be stored in a HashMap. * * @param table * The name of the table * @param key * The record key of the record to read. * @param fields * The list of fields to read, or null for all of them * @param result * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error or "not found". */ @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { try { final GetResponse response = client.prepareGet(indexKey, table, key).execute().actionGet(); if (response.isExists()) { if (fields != null) { for (String field : fields) { result.put(field, new StringByteIterator( (String) response.getSource().get(field))); } } else { for (String field : response.getSource().keySet()) { result.put(field, new StringByteIterator( (String) response.getSource().get(field))); } } return Status.OK; } else { return Status.NOT_FOUND; } } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } /** * Update a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key, overwriting any existing values with the same field name. * * @param table * The name of the table * @param key * The record key of the record to write. * @param values * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error. See this class's * description for a discussion of error codes. */ @Override public Status update(String table, String key, Map<String, ByteIterator> values) { try { final GetResponse response = client.prepareGet(indexKey, table, key).execute().actionGet(); if (response.isExists()) { for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { response.getSource().put(entry.getKey(), entry.getValue()); } client.prepareIndex(indexKey, table, key).setSource(response.getSource()).execute().actionGet(); return Status.OK; } else { return Status.NOT_FOUND; } } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } /** * Perform a range scan for a set of records in the database. Each field/value * pair from the result will be stored in a HashMap. * * @param table * The name of the table * @param startkey * The record key of the first record to read. * @param recordcount * The number of records to read * @param fields * The list of fields to read, or null for all of them * @param result * A Vector of HashMaps, where each HashMap is a set field/value * pairs for one record * @return Zero on success, a non-zero error code on error. See this class's * description for a discussion of error codes. */ @Override public Status scan( String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { final RangeQueryBuilder rangeQuery = rangeQuery("_id").gte(startkey); final SearchResponse response = client.prepareSearch(indexKey) .setTypes(table) .setQuery(rangeQuery) .setSize(recordcount) .execute() .actionGet(); HashMap<String, ByteIterator> entry; for (SearchHit hit : response.getHits()) { entry = new HashMap<>(fields.size()); for (String field : fields) { entry.put(field, new StringByteIterator((String) hit.getSource().get(field))); } result.add(entry); } return Status.OK; } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } } }
13,255
34.730458
116
java
null
NearPMSW-main/baseline/logging/YCSB2/nosqldb/src/main/java/site/ycsb/db/package-info.java
/* * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. See accompanying LICENSE file. */ /** * The YCSB binding for <a href= * "http://www.oracle.com/us/products/database/nosql/overview/index.html">Oracle * 's NoSQL DB</a>. */ package site.ycsb.db;
814
34.434783
80
java
null
NearPMSW-main/baseline/logging/YCSB2/nosqldb/src/main/java/site/ycsb/db/NoSqlDbClient.java
/** * Copyright (c) 2012 YCSB contributors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. */ package site.ycsb.db; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.SortedMap; import java.util.Vector; import java.util.concurrent.TimeUnit; import oracle.kv.Consistency; import oracle.kv.Durability; import oracle.kv.FaultException; import oracle.kv.KVStore; import oracle.kv.KVStoreConfig; import oracle.kv.KVStoreFactory; import oracle.kv.Key; import oracle.kv.RequestLimitConfig; import oracle.kv.Value; import oracle.kv.ValueVersion; import site.ycsb.ByteArrayByteIterator; import site.ycsb.ByteIterator; import site.ycsb.DB; import site.ycsb.DBException; import site.ycsb.Status; /** * A database interface layer for Oracle NoSQL Database. */ public class NoSqlDbClient extends DB { private KVStore store; private int getPropertyInt(Properties properties, String key, int defaultValue) throws DBException { String p = properties.getProperty(key); int i = defaultValue; if (p != null) { try { i = Integer.parseInt(p); } catch (NumberFormatException e) { throw new DBException("Illegal number format in " + key + " property"); } } return i; } @Override public void init() throws DBException { Properties properties = getProperties(); /* Mandatory properties */ String storeName = properties.getProperty("storeName", "kvstore"); String[] helperHosts = properties.getProperty("helperHost", "localhost:5000").split(","); KVStoreConfig config = new KVStoreConfig(storeName, helperHosts); /* Optional properties */ String p; p = properties.getProperty("consistency"); if (p != null) { if (p.equalsIgnoreCase("ABSOLUTE")) { config.setConsistency(Consistency.ABSOLUTE); } else if (p.equalsIgnoreCase("NONE_REQUIRED")) { config.setConsistency(Consistency.NONE_REQUIRED); } else { throw new DBException("Illegal value in consistency property"); } } p = properties.getProperty("durability"); if (p != null) { if (p.equalsIgnoreCase("COMMIT_NO_SYNC")) { config.setDurability(Durability.COMMIT_NO_SYNC); } else if (p.equalsIgnoreCase("COMMIT_SYNC")) { config.setDurability(Durability.COMMIT_SYNC); } else if (p.equalsIgnoreCase("COMMIT_WRITE_NO_SYNC")) { config.setDurability(Durability.COMMIT_WRITE_NO_SYNC); } else { throw new DBException("Illegal value in durability property"); } } int maxActiveRequests = getPropertyInt(properties, "requestLimit.maxActiveRequests", RequestLimitConfig.DEFAULT_MAX_ACTIVE_REQUESTS); int requestThresholdPercent = getPropertyInt(properties, "requestLimit.requestThresholdPercent", RequestLimitConfig.DEFAULT_REQUEST_THRESHOLD_PERCENT); int nodeLimitPercent = getPropertyInt(properties, "requestLimit.nodeLimitPercent", RequestLimitConfig.DEFAULT_NODE_LIMIT_PERCENT); RequestLimitConfig requestLimitConfig; /* * It is said that the constructor could throw NodeRequestLimitException in * Javadoc, the exception is not provided */ // try { requestLimitConfig = new RequestLimitConfig(maxActiveRequests, requestThresholdPercent, nodeLimitPercent); // } catch (NodeRequestLimitException e) { // throw new DBException(e); // } config.setRequestLimit(requestLimitConfig); p = properties.getProperty("requestTimeout"); if (p != null) { long timeout = 1; try { timeout = Long.parseLong(p); } catch (NumberFormatException e) { throw new DBException( "Illegal number format in requestTimeout property"); } try { // TODO Support other TimeUnit config.setRequestTimeout(timeout, TimeUnit.SECONDS); } catch (IllegalArgumentException e) { throw new DBException(e); } } try { store = KVStoreFactory.getStore(config); } catch (FaultException e) { throw new DBException(e); } } @Override public void cleanup() throws DBException { store.close(); } /** * Create a key object. We map "table" and (YCSB's) "key" to a major component * of the oracle.kv.Key, and "field" to a minor component. * * @return An oracle.kv.Key object. */ private static Key createKey(String table, String key, String field) { List<String> majorPath = new ArrayList<String>(); majorPath.add(table); majorPath.add(key); if (field == null) { return Key.createKey(majorPath); } return Key.createKey(majorPath, field); } private static Key createKey(String table, String key) { return createKey(table, key, null); } private static String getFieldFromKey(Key key) { return key.getMinorPath().get(0); } @Override public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) { Key kvKey = createKey(table, key); SortedMap<Key, ValueVersion> kvResult; try { kvResult = store.multiGet(kvKey, null, null); } catch (FaultException e) { System.err.println(e); return Status.ERROR; } for (Map.Entry<Key, ValueVersion> entry : kvResult.entrySet()) { /* If fields is null, read all fields */ String field = getFieldFromKey(entry.getKey()); if (fields != null && !fields.contains(field)) { continue; } result.put(field, new ByteArrayByteIterator(entry.getValue().getValue().getValue())); } return Status.OK; } @Override public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { System.err.println("Oracle NoSQL Database does not support Scan semantics"); return Status.ERROR; } @Override public Status update(String table, String key, Map<String, ByteIterator> values) { for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { Key kvKey = createKey(table, key, entry.getKey()); Value kvValue = Value.createValue(entry.getValue().toArray()); try { store.put(kvKey, kvValue); } catch (FaultException e) { System.err.println(e); return Status.ERROR; } } return Status.OK; } @Override public Status insert(String table, String key, Map<String, ByteIterator> values) { return update(table, key, values); } @Override public Status delete(String table, String key) { Key kvKey = createKey(table, key); try { store.multiDelete(kvKey, null, null); } catch (FaultException e) { System.err.println(e); return Status.ERROR; } return Status.OK; } }
7,466
29.108871
102
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/android-support-v7-appcompat/gen/android/support/v7/appcompat/R.java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.v7.appcompat; public final class R { public static final class anim { public static int abc_fade_in=0x7f040000; public static int abc_fade_out=0x7f040001; public static int abc_slide_in_bottom=0x7f040002; public static int abc_slide_in_top=0x7f040003; public static int abc_slide_out_bottom=0x7f040004; public static int abc_slide_out_top=0x7f040005; } public static final class attr { /** Custom divider drawable to use for elements in the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarDivider=0x7f01000b; /** Custom item state list drawable background for action bar items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarItemBackground=0x7f01000c; /** Size of the Action Bar, including the contextual bar used to present Action Modes. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionBarSize=0x7f01000a; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarSplitStyle=0x7f010008; /** Reference to a style for the Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarStyle=0x7f010007; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabBarStyle=0x7f010004; /** Default style for tabs within an action bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabTextStyle=0x7f010005; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarWidgetTheme=0x7f010009; /** Default action button style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionButtonStyle=0x7f010012; /** Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionDropDownStyle=0x7f010043; /** An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionLayout=0x7f01004a; /** TextAppearance style that will be applied to text that appears within action menu items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionMenuTextAppearance=0x7f01000d; /** Color for text that appears within action menu items. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int actionMenuTextColor=0x7f01000e; /** Background drawable to use for action mode UI <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeBackground=0x7f010038; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCloseButtonStyle=0x7f010037; /** Drawable to use for the close action mode button <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCloseDrawable=0x7f01003a; /** Drawable to use for the Copy action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCopyDrawable=0x7f01003c; /** Drawable to use for the Cut action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCutDrawable=0x7f01003b; /** Drawable to use for the Find action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeFindDrawable=0x7f010040; /** Drawable to use for the Paste action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModePasteDrawable=0x7f01003d; /** PopupWindow style to use for action modes when showing as a window overlay. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModePopupWindowStyle=0x7f010042; /** Drawable to use for the Select all action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeSelectAllDrawable=0x7f01003e; /** Drawable to use for the Share action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeShareDrawable=0x7f01003f; /** Background drawable to use for action mode UI in the lower split bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeSplitBackground=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeStyle=0x7f010036; /** Drawable to use for the Web Search action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeWebSearchDrawable=0x7f010041; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionOverflowButtonStyle=0x7f010006; /** The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionProviderClass=0x7f01004c; /** The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionViewClass=0x7f01004b; /** Default ActivityChooserView style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int activityChooserViewStyle=0x7f010068; /** Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int background=0x7f01002b; /** Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int backgroundSplit=0x7f01002d; /** Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int backgroundStacked=0x7f01002c; /** A style that may be applied to Buttons placed within a LinearLayout with the style buttonBarStyle to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int buttonBarButtonStyle=0x7f010014; /** A style that may be applied to horizontal LinearLayouts to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int buttonBarStyle=0x7f010013; /** Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int customNavigationLayout=0x7f01002e; /** Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int disableChildrenWhenDisabled=0x7f010050; /** Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static int displayOptions=0x7f010024; /** Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int divider=0x7f01002a; /** A drawable that may be used as a horizontal divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dividerHorizontal=0x7f010017; /** Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int dividerPadding=0x7f010052; /** A drawable that may be used as a vertical divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dividerVertical=0x7f010016; /** ListPopupWindow comaptibility <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dropDownListViewStyle=0x7f01001d; /** The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int dropdownListPreferredItemHeight=0x7f010044; /** The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int expandActivityOverflowButtonDrawable=0x7f010067; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int height=0x7f010022; /** Specifies a drawable to use for the 'home as up' indicator. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int homeAsUpIndicator=0x7f01000f; /** Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int homeLayout=0x7f01002f; /** Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int icon=0x7f010028; /** The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int iconifiedByDefault=0x7f010056; /** Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int indeterminateProgressStyle=0x7f010031; /** The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int initialActivityCount=0x7f010066; /** Specifies whether the theme is light, otherwise it is dark. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int isLightTheme=0x7f010055; /** Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int itemPadding=0x7f010033; /** Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int listChoiceBackgroundIndicator=0x7f010048; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int listPopupWindowStyle=0x7f01001e; /** The preferred list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeight=0x7f010018; /** A larger, more robust list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeightLarge=0x7f01001a; /** A smaller, sleeker list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeightSmall=0x7f010019; /** The preferred padding along the left edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemPaddingLeft=0x7f01001b; /** The preferred padding along the right edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemPaddingRight=0x7f01001c; /** Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int logo=0x7f010029; /** The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> */ public static int navigationMode=0x7f010023; /** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int paddingEnd=0x7f010035; /** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int paddingStart=0x7f010034; /** Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int panelMenuListTheme=0x7f010047; /** Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int panelMenuListWidth=0x7f010046; /** Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int popupMenuStyle=0x7f010045; /** Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int popupPromptView=0x7f01004f; /** Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int progressBarPadding=0x7f010032; /** Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int progressBarStyle=0x7f010030; /** The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int prompt=0x7f01004d; /** An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int queryHint=0x7f010057; /** SearchView dropdown background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchDropdownBackground=0x7f010058; /** The list item height for search results. @hide <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int searchResultListItemHeight=0x7f010061; /** SearchView AutoCompleteTextView style <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewAutoCompleteTextView=0x7f010065; /** SearchView close button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewCloseIcon=0x7f010059; /** SearchView query refinement icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewEditQuery=0x7f01005d; /** SearchView query refinement icon background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewEditQueryBackground=0x7f01005e; /** SearchView Go button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewGoIcon=0x7f01005a; /** SearchView Search icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewSearchIcon=0x7f01005b; /** SearchView text field background for the left section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewTextField=0x7f01005f; /** SearchView text field background for the right section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewTextFieldRight=0x7f010060; /** SearchView Voice button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewVoiceIcon=0x7f01005c; /** A style that may be applied to buttons or other selectable items that should react to pressed and focus states, but that do not have a clear visual border along the edges. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int selectableItemBackground=0x7f010015; /** How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> */ public static int showAsAction=0x7f010049; /** Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static int showDividers=0x7f010051; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int spinnerDropDownItemStyle=0x7f010054; /** Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> */ public static int spinnerMode=0x7f01004e; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int spinnerStyle=0x7f010053; /** Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int subtitle=0x7f010025; /** Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int subtitleTextStyle=0x7f010027; /** Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static int textAllCaps=0x7f010069; /** Text color, typeface, size, and style for the text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceLargePopupMenu=0x7f010010; /** The preferred TextAppearance for the primary text of list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceListItem=0x7f01001f; /** The preferred TextAppearance for the primary text of small list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceListItemSmall=0x7f010020; /** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSearchResultSubtitle=0x7f010063; /** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSearchResultTitle=0x7f010062; /** Text color, typeface, size, and style for small text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSmallPopupMenu=0x7f010011; /** Text color for urls in search suggestions, used by things like global search <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int textColorSearchUrl=0x7f010064; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int title=0x7f010021; /** Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int titleTextStyle=0x7f010026; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowActionBar=0x7f010000; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowActionBarOverlay=0x7f010001; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowSplitActionBar=0x7f010002; } public static final class bool { public static int abc_action_bar_embed_tabs_pre_jb=0x7f060000; public static int abc_action_bar_expanded_action_views_exclusive=0x7f060001; /** Whether action menu items should be displayed in ALLCAPS or not. Defaults to true. If this is not appropriate for specific locales it should be disabled in that locale's resources. */ public static int abc_config_actionMenuItemAllCaps=0x7f060005; /** Whether action menu items should obey the "withText" showAsAction flag. This may be set to false for situations where space is extremely limited. Whether action menu items should obey the "withText" showAsAction. This may be set to false for situations where space is extremely limited. */ public static int abc_config_allowActionMenuItemTextWithIcon=0x7f060004; public static int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003; public static int abc_split_action_bar_is_narrow=0x7f060002; } public static final class color { public static int abc_search_url_text_holo=0x7f070003; public static int abc_search_url_text_normal=0x7f070000; public static int abc_search_url_text_pressed=0x7f070002; public static int abc_search_url_text_selected=0x7f070001; } public static final class dimen { /** Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. */ public static int abc_action_bar_default_height=0x7f080002; /** Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. */ public static int abc_action_bar_icon_vertical_padding=0x7f080003; /** Maximum height for a stacked tab bar as part of an action bar */ public static int abc_action_bar_stacked_max_height=0x7f080009; /** Maximum width for a stacked action bar tab. This prevents action bar tabs from becoming too wide on a wide screen when only a few are present. */ public static int abc_action_bar_stacked_tab_max_width=0x7f080001; /** Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles */ public static int abc_action_bar_subtitle_bottom_margin=0x7f080007; /** Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles */ public static int abc_action_bar_subtitle_text_size=0x7f080005; /** Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles */ public static int abc_action_bar_subtitle_top_margin=0x7f080006; /** Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles */ public static int abc_action_bar_title_text_size=0x7f080004; /** Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar */ public static int abc_action_button_min_width=0x7f080008; /** The maximum width we would prefer dialogs to be. 0 if there is no maximum (let them grow as large as the screen). Actual values are specified for -large and -xlarge configurations. see comment in values/config.xml see comment in values/config.xml */ public static int abc_config_prefDialogWidth=0x7f080000; /** Width of the icon in a dropdown list */ public static int abc_dropdownitem_icon_width=0x7f08000f; /** Text padding for dropdown items */ public static int abc_dropdownitem_text_padding_left=0x7f08000d; public static int abc_dropdownitem_text_padding_right=0x7f08000e; public static int abc_panel_menu_list_width=0x7f08000a; /** Preferred width of the search view. */ public static int abc_search_view_preferred_width=0x7f08000c; /** Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. */ public static int abc_search_view_text_min_width=0x7f08000b; } public static final class drawable { public static int abc_ab_bottom_solid_dark_holo=0x7f020000; public static int abc_ab_bottom_solid_light_holo=0x7f020001; public static int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static int abc_ab_bottom_transparent_light_holo=0x7f020003; public static int abc_ab_share_pack_holo_dark=0x7f020004; public static int abc_ab_share_pack_holo_light=0x7f020005; public static int abc_ab_solid_dark_holo=0x7f020006; public static int abc_ab_solid_light_holo=0x7f020007; public static int abc_ab_stacked_solid_dark_holo=0x7f020008; public static int abc_ab_stacked_solid_light_holo=0x7f020009; public static int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static int abc_ab_transparent_dark_holo=0x7f02000c; public static int abc_ab_transparent_light_holo=0x7f02000d; public static int abc_cab_background_bottom_holo_dark=0x7f02000e; public static int abc_cab_background_bottom_holo_light=0x7f02000f; public static int abc_cab_background_top_holo_dark=0x7f020010; public static int abc_cab_background_top_holo_light=0x7f020011; public static int abc_ic_ab_back_holo_dark=0x7f020012; public static int abc_ic_ab_back_holo_light=0x7f020013; public static int abc_ic_cab_done_holo_dark=0x7f020014; public static int abc_ic_cab_done_holo_light=0x7f020015; public static int abc_ic_clear=0x7f020016; public static int abc_ic_clear_disabled=0x7f020017; public static int abc_ic_clear_holo_light=0x7f020018; public static int abc_ic_clear_normal=0x7f020019; public static int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static int abc_ic_clear_search_api_holo_light=0x7f02001b; public static int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static int abc_ic_commit_search_api_holo_light=0x7f02001d; public static int abc_ic_go=0x7f02001e; public static int abc_ic_go_search_api_holo_light=0x7f02001f; public static int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static int abc_ic_menu_share_holo_dark=0x7f020022; public static int abc_ic_menu_share_holo_light=0x7f020023; public static int abc_ic_search=0x7f020024; public static int abc_ic_search_api_holo_light=0x7f020025; public static int abc_ic_voice_search=0x7f020026; public static int abc_ic_voice_search_api_holo_light=0x7f020027; public static int abc_item_background_holo_dark=0x7f020028; public static int abc_item_background_holo_light=0x7f020029; public static int abc_list_divider_holo_dark=0x7f02002a; public static int abc_list_divider_holo_light=0x7f02002b; public static int abc_list_focused_holo=0x7f02002c; public static int abc_list_longpressed_holo=0x7f02002d; public static int abc_list_pressed_holo_dark=0x7f02002e; public static int abc_list_pressed_holo_light=0x7f02002f; public static int abc_list_selector_background_transition_holo_dark=0x7f020030; public static int abc_list_selector_background_transition_holo_light=0x7f020031; public static int abc_list_selector_disabled_holo_dark=0x7f020032; public static int abc_list_selector_disabled_holo_light=0x7f020033; public static int abc_list_selector_holo_dark=0x7f020034; public static int abc_list_selector_holo_light=0x7f020035; public static int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static int abc_menu_dropdown_panel_holo_light=0x7f020037; public static int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static int abc_menu_hardkey_panel_holo_light=0x7f020039; public static int abc_search_dropdown_dark=0x7f02003a; public static int abc_search_dropdown_light=0x7f02003b; public static int abc_spinner_ab_default_holo_dark=0x7f02003c; public static int abc_spinner_ab_default_holo_light=0x7f02003d; public static int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static int abc_spinner_ab_focused_holo_dark=0x7f020040; public static int abc_spinner_ab_focused_holo_light=0x7f020041; public static int abc_spinner_ab_holo_dark=0x7f020042; public static int abc_spinner_ab_holo_light=0x7f020043; public static int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static int abc_spinner_ab_pressed_holo_light=0x7f020045; public static int abc_tab_indicator_ab_holo=0x7f020046; public static int abc_tab_selected_focused_holo=0x7f020047; public static int abc_tab_selected_holo=0x7f020048; public static int abc_tab_selected_pressed_holo=0x7f020049; public static int abc_tab_unselected_pressed_holo=0x7f02004a; public static int abc_textfield_search_default_holo_dark=0x7f02004b; public static int abc_textfield_search_default_holo_light=0x7f02004c; public static int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static int abc_textfield_search_right_default_holo_light=0x7f02004e; public static int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static int abc_textfield_search_right_selected_holo_light=0x7f020050; public static int abc_textfield_search_selected_holo_dark=0x7f020051; public static int abc_textfield_search_selected_holo_light=0x7f020052; public static int abc_textfield_searchview_holo_dark=0x7f020053; public static int abc_textfield_searchview_holo_light=0x7f020054; public static int abc_textfield_searchview_right_holo_dark=0x7f020055; public static int abc_textfield_searchview_right_holo_light=0x7f020056; } public static final class id { public static int action_bar=0x7f05001a; public static int action_bar_activity_content=0x7f050015; public static int action_bar_container=0x7f050019; public static int action_bar_overlay_layout=0x7f05001d; public static int action_bar_root=0x7f050018; public static int action_bar_subtitle=0x7f050021; public static int action_bar_title=0x7f050020; public static int action_context_bar=0x7f05001b; public static int action_menu_divider=0x7f050016; public static int action_menu_presenter=0x7f050017; public static int action_mode_bar=0x7f05002f; public static int action_mode_bar_stub=0x7f05002e; public static int action_mode_close_button=0x7f050022; public static int activity_chooser_view_content=0x7f050023; public static int always=0x7f05000b; public static int beginning=0x7f050011; public static int checkbox=0x7f05002b; public static int collapseActionView=0x7f05000d; public static int default_activity_button=0x7f050026; public static int dialog=0x7f05000e; public static int disableHome=0x7f050008; public static int dropdown=0x7f05000f; public static int edit_query=0x7f050036; public static int end=0x7f050013; public static int expand_activities_button=0x7f050024; public static int expanded_menu=0x7f05002a; public static int home=0x7f050014; public static int homeAsUp=0x7f050005; public static int icon=0x7f050028; public static int ifRoom=0x7f05000a; public static int image=0x7f050025; public static int left_icon=0x7f050031; public static int listMode=0x7f050001; public static int list_item=0x7f050027; public static int middle=0x7f050012; public static int never=0x7f050009; public static int none=0x7f050010; public static int normal=0x7f050000; public static int progress_circular=0x7f050034; public static int progress_horizontal=0x7f050035; public static int radio=0x7f05002d; public static int right_container=0x7f050032; public static int right_icon=0x7f050033; public static int search_badge=0x7f050038; public static int search_bar=0x7f050037; public static int search_button=0x7f050039; public static int search_close_btn=0x7f05003e; public static int search_edit_frame=0x7f05003a; public static int search_go_btn=0x7f050040; public static int search_mag_icon=0x7f05003b; public static int search_plate=0x7f05003c; public static int search_src_text=0x7f05003d; public static int search_voice_btn=0x7f050041; public static int shortcut=0x7f05002c; public static int showCustom=0x7f050007; public static int showHome=0x7f050004; public static int showTitle=0x7f050006; public static int split_action_bar=0x7f05001c; public static int submit_area=0x7f05003f; public static int tabMode=0x7f050002; public static int title=0x7f050029; public static int title_container=0x7f050030; public static int top_action_bar=0x7f05001e; public static int up=0x7f05001f; public static int useLogo=0x7f050003; public static int withText=0x7f05000c; } public static final class integer { /** The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. */ public static int abc_max_action_buttons=0x7f090000; } public static final class layout { public static int abc_action_bar_decor=0x7f030000; public static int abc_action_bar_decor_include=0x7f030001; public static int abc_action_bar_decor_overlay=0x7f030002; public static int abc_action_bar_home=0x7f030003; public static int abc_action_bar_tab=0x7f030004; public static int abc_action_bar_tabbar=0x7f030005; public static int abc_action_bar_title_item=0x7f030006; public static int abc_action_bar_view_list_nav_layout=0x7f030007; public static int abc_action_menu_item_layout=0x7f030008; public static int abc_action_menu_layout=0x7f030009; public static int abc_action_mode_bar=0x7f03000a; public static int abc_action_mode_close_item=0x7f03000b; public static int abc_activity_chooser_view=0x7f03000c; public static int abc_activity_chooser_view_include=0x7f03000d; public static int abc_activity_chooser_view_list_item=0x7f03000e; public static int abc_expanded_menu_layout=0x7f03000f; public static int abc_list_menu_item_checkbox=0x7f030010; public static int abc_list_menu_item_icon=0x7f030011; public static int abc_list_menu_item_layout=0x7f030012; public static int abc_list_menu_item_radio=0x7f030013; public static int abc_popup_menu_item_layout=0x7f030014; public static int abc_screen=0x7f030015; public static int abc_search_dropdown_item_icons_2line=0x7f030016; public static int abc_search_view=0x7f030017; public static int support_simple_spinner_dropdown_item=0x7f030018; } public static final class string { /** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] */ public static int abc_action_bar_home_description=0x7f0a0001; /** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] */ public static int abc_action_bar_up_description=0x7f0a0002; /** Content description for the action menu overflow button. [CHAR LIMIT=NONE] */ public static int abc_action_menu_overflow_description=0x7f0a0003; /** Label for the "Done" button on the far left of action mode toolbars. */ public static int abc_action_mode_done=0x7f0a0000; /** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] */ public static int abc_activity_chooser_view_see_all=0x7f0a000a; /** ActivityChooserView - accessibility support Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] */ public static int abc_activitychooserview_choose_application=0x7f0a0009; /** SearchView accessibility description for clear button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_clear=0x7f0a0006; /** SearchView accessibility description for search text field [CHAR LIMIT=NONE] */ public static int abc_searchview_description_query=0x7f0a0005; /** SearchView accessibility description for search button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_search=0x7f0a0004; /** SearchView accessibility description for submit button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_submit=0x7f0a0007; /** SearchView accessibility description for voice button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_voice=0x7f0a0008; /** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static int abc_shareactionprovider_share_with=0x7f0a000c; /** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static int abc_shareactionprovider_share_with_application=0x7f0a000b; } public static final class style { /** Mimic text appearance in select_dialog_item.xml */ public static int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0061; public static int TextAppearance_AppCompat_Base_SearchResult=0x7f0b0069; public static int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006b; /** Search View result styles */ public static int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006a; public static int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0065; public static int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b0066; public static int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b006c; public static int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b006e; /** TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default versions instead (which are exactly the same). */ public static int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b006d; public static int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b0067; public static int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b0068; public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0033; public static int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0032; public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b002e; public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b002f; public static int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0031; public static int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0030; public static int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a; public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006; public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008; public static int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005; public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007; public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e; public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020; public static int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d; public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0052; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0054; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0056; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0053; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0055; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b004f; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0051; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b004e; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0050; public static int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b005f; public static int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021; public static int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002c; public static int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002d; public static int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0060; public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028; /** Themes in the "Theme.AppCompat" family will contain an action bar by default. If Holo themes are available on the current platform version they will be used. A limited Holo-styled action bar will be provided on platform versions older than 3.0. (API 11) These theme declarations contain any version-independent specification. Items that need to vary based on platform version should be defined in the corresponding "Theme.Base" theme. Platform-independent theme providing an action bar in a dark-themed activity. */ public static int Theme_AppCompat=0x7f0b0073; /** Menu/item attributes */ public static int Theme_AppCompat_Base_CompactMenu=0x7f0b007d; public static int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b007e; /** Menu/item attributes */ public static int Theme_AppCompat_CompactMenu=0x7f0b0076; public static int Theme_AppCompat_CompactMenu_Dialog=0x7f0b0077; /** Platform-independent theme providing an action bar in a light-themed activity. */ public static int Theme_AppCompat_Light=0x7f0b0074; /** Platform-independent theme providing an action bar in a dark-themed activity. */ public static int Theme_AppCompat_Light_DarkActionBar=0x7f0b0075; /** Base platform-dependent theme */ public static int Theme_Base=0x7f0b0078; /** Base platform-dependent theme providing an action bar in a dark-themed activity. Base platform-dependent theme providing an action bar in a dark-themed activity. */ public static int Theme_Base_AppCompat=0x7f0b007a; /** Base platform-dependent theme providing an action bar in a light-themed activity. Base platform-dependent theme providing an action bar in a light-themed activity. */ public static int Theme_Base_AppCompat_Light=0x7f0b007b; /** Base platform-dependent theme providing a dark action bar in a light-themed activity. Base platform-dependent theme providing a dark action bar in a light-themed activity. */ public static int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b007c; /** Base platform-dependent theme providing a light-themed activity. */ public static int Theme_Base_Light=0x7f0b0079; /** Styles in here can be extended for customisation in your application. Each utilises one of the Base styles. If Holo themes are available on the current platform version they will be used instead of the compat styles. */ public static int Widget_AppCompat_ActionBar=0x7f0b0000; public static int Widget_AppCompat_ActionBar_Solid=0x7f0b0002; public static int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011; public static int Widget_AppCompat_ActionBar_TabText=0x7f0b0017; public static int Widget_AppCompat_ActionBar_TabView=0x7f0b0014; public static int Widget_AppCompat_ActionButton=0x7f0b000b; public static int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d; public static int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f; public static int Widget_AppCompat_ActionMode=0x7f0b001b; public static int Widget_AppCompat_ActivityChooserView=0x7f0b0036; public static int Widget_AppCompat_AutoCompleteTextView=0x7f0b0034; public static int Widget_AppCompat_Base_ActionBar=0x7f0b0038; public static int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003a; public static int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0043; public static int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b0049; public static int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0046; /** Action Button Styles */ public static int Widget_AppCompat_Base_ActionButton=0x7f0b003d; public static int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b003f; public static int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0041; public static int Widget_AppCompat_Base_ActionMode=0x7f0b004c; public static int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0071; /** AutoCompleteTextView styles (for SearchView) */ public static int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b006f; public static int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005b; /** Spinner Widgets */ public static int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005d; public static int Widget_AppCompat_Base_ListView_Menu=0x7f0b0062; /** Popup Menu */ public static int Widget_AppCompat_Base_PopupMenu=0x7f0b0063; public static int Widget_AppCompat_Base_ProgressBar=0x7f0b0058; /** Progress Bar */ public static int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0057; /** Action Bar Spinner Widgets */ public static int Widget_AppCompat_Base_Spinner=0x7f0b0059; public static int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024; public static int Widget_AppCompat_Light_ActionBar=0x7f0b0001; public static int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003; public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004; public static int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012; public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013; public static int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018; public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019; public static int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015; public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016; public static int Widget_AppCompat_Light_ActionButton=0x7f0b000c; public static int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e; public static int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010; public static int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c; public static int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0037; public static int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0035; public static int Widget_AppCompat_Light_Base_ActionBar=0x7f0b0039; public static int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003b; public static int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003c; public static int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0044; public static int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0045; public static int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004a; public static int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004b; public static int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0047; public static int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b0048; public static int Widget_AppCompat_Light_Base_ActionButton=0x7f0b003e; public static int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0040; public static int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0042; public static int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004d; public static int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0072; public static int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0070; public static int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005c; public static int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b005e; public static int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0064; public static int Widget_AppCompat_Light_Base_Spinner=0x7f0b005a; public static int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025; public static int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027; public static int Widget_AppCompat_Light_PopupMenu=0x7f0b002a; public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023; public static int Widget_AppCompat_ListView_DropDown=0x7f0b0026; public static int Widget_AppCompat_ListView_Menu=0x7f0b002b; public static int Widget_AppCompat_PopupMenu=0x7f0b0029; public static int Widget_AppCompat_ProgressBar=0x7f0b000a; public static int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009; public static int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022; } public static final class styleable { /** ============================================ Attributes used to style the Action Bar. These should be set on your theme; the default actionBarStyle will propagate them to the correct elements as needed. Please Note: when overriding attributes for an ActionBar style you must specify each attribute twice: once with the "android:" namespace prefix and once without. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBar_background android.support.v7.appcompat:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit android.support.v7.appcompat:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked android.support.v7.appcompat:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout android.support.v7.appcompat:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions android.support.v7.appcompat:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_divider android.support.v7.appcompat:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_height android.support.v7.appcompat:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout android.support.v7.appcompat:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_icon android.support.v7.appcompat:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle android.support.v7.appcompat:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_itemPadding android.support.v7.appcompat:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of system-provided items in the bar.</td></tr> <tr><td><code>{@link #ActionBar_logo android.support.v7.appcompat:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode android.support.v7.appcompat:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding android.support.v7.appcompat:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle android.support.v7.appcompat:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_subtitle android.support.v7.appcompat:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle android.support.v7.appcompat:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_title android.support.v7.appcompat:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle android.support.v7.appcompat:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; /** <p> @attr description Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:background */ public static final int ActionBar_background = 10; /** <p> @attr description Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p> @attr description Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p> @attr description Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p> @attr description Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.appcompat:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p> @attr description Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:divider */ public static final int ActionBar_divider = 9; /** <p> @attr description Specifies a fixed height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:height */ public static final int ActionBar_height = 1; /** <p> @attr description Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p> @attr description Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:icon */ public static final int ActionBar_icon = 7; /** <p> @attr description Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p> @attr description Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p> @attr description Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:logo */ public static final int ActionBar_logo = 8; /** <p> @attr description The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.appcompat:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p> @attr description Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p> @attr description Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p> @attr description Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:subtitle */ public static final int ActionBar_subtitle = 4; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p> @attr description Specifies title text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:title */ public static final int ActionBar_title = 0; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Valid LayoutParams for views placed in the action bar as custom views. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr> </table> @see #ActionBarLayout_android_layout_gravity */ public static final int[] ActionBarLayout = { 0x010100b3 }; /** <p>This symbol is the offset where the {@link android.R.attr#layout_gravity} attribute's value can be found in the {@link #ActionBarLayout} array. @attr name android:layout_gravity */ public static final int ActionBarLayout_android_layout_gravity = 0; /** These attributes are meant to be specified and customized by the app. The system will read and apply them as needed. These attributes control properties of the activity window, such as whether an action bar should be present and whether it should overlay content. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar android.support.v7.appcompat:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay android.support.v7.appcompat:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar android.support.v7.appcompat:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; /** <p>This symbol is the offset where the {@link android.support.v7.appcompat.R.attr#windowActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.appcompat:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link android.support.v7.appcompat.R.attr#windowActionBarOverlay} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.appcompat:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p>This symbol is the offset where the {@link android.support.v7.appcompat.R.attr#windowSplitActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.appcompat:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Size of padding on either end of a divider. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background android.support.v7.appcompat:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit android.support.v7.appcompat:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height android.support.v7.appcompat:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle android.support.v7.appcompat:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle android.support.v7.appcompat:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; /** <p> @attr description Specifies a background for the action mode bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:background */ public static final int ActionMode_background = 3; /** <p> @attr description Specifies a background for the split action mode bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p> @attr description Specifies a fixed height for the action mode bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:height */ public static final int ActionMode_height = 0; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attrbitutes for a ActivityChooserView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable android.support.v7.appcompat:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount android.support.v7.appcompat:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; /** <p> @attr description The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p> @attr description The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:initialActivityCount */ public static final int ActivityChooserView_initialActivityCount = 0; /** Attributes that can be used with a CompatTextView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #CompatTextView_textAllCaps android.support.v7.appcompat:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f010069 }; /** <p> @attr description Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:textAllCaps */ public static final int CompatTextView_textAllCaps = 0; /** Attributes that can be used with a LinearLayoutICS. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #LinearLayoutICS_divider android.support.v7.appcompat:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding android.support.v7.appcompat:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers android.support.v7.appcompat:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; /** <p> @attr description Drawable to use as a vertical divider between buttons. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:divider */ public static final int LinearLayoutICS_divider = 0; /** <p> @attr description Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p> @attr description Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.appcompat:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Base attributes that are available to all groups. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p> @attr description Whether the items are capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkableBehavior}. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p> @attr description Whether the items are enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p> @attr description The ID of the group. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p> @attr description The category applied to all items within this group. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p> @attr description The order within the category applied to all items within this group. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p> @attr description Whether the items are shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Base attributes that are available to all Item objects. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuItem_actionLayout android.support.v7.appcompat:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass android.support.v7.appcompat:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item.</td></tr> <tr><td><code>{@link #MenuItem_actionViewClass android.support.v7.appcompat:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an action view.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be called when the item is clicked.</td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction android.support.v7.appcompat:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; /** <p> @attr description An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p> @attr description The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p> @attr description The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p> @attr description The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#alphabeticShortcut}. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p> @attr description Whether the item is capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkable}. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p> @attr description Whether the item is checked. Note that you must first have enabled checking with the checkable attribute or else the check mark will not appear. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checked}. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p> @attr description Whether the item is enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p> @attr description The icon associated with this item. This icon will not always be shown, so the title should be sufficient in describing this item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#icon}. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p> @attr description The ID of the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p> @attr description The category applied to the item. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p> @attr description The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#numericShortcut}. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p> @attr description Name of a method on the Context used to inflate the menu that will be called when the item is clicked. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#onClick}. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p> @attr description The order within the category applied to the item. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p> @attr description The title associated with the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#title}. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p> @attr description The condensed title associated with the item. This is used in situations where the normal title may be too long to be displayed. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#titleCondensed}. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p> @attr description Whether the item is shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p> @attr description How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.appcompat:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101040c }; /** <p> @attr description Default background for the menu header. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#headerBackground}. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p> @attr description Default horizontal divider between rows of menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#horizontalDivider}. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p> @attr description Default background for each menu item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemBackground}. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p> @attr description Default disabled icon alpha for each menu item that shows an icon. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemIconDisabledAlpha}. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p> @attr description Default appearance of menu item text. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemTextAppearance}. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p> @attr description Whether space should be reserved in layout when an icon is missing. <p>This is a private symbol. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p> @attr description Default vertical divider between menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#verticalDivider}. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p> @attr description Default animations for the menu. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#windowAnimationStyle}. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault android.support.v7.appcompat:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_queryHint android.support.v7.appcompat:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; /** <p> @attr description The IME options to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#imeOptions}. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p> @attr description The input type to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#inputType}. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p> @attr description An optional maximum width of the SearchView. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#maxWidth}. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p> @attr description The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p> @attr description An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled android.support.v7.appcompat:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.</td></tr> <tr><td><code>{@link #Spinner_popupPromptView android.support.v7.appcompat:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_prompt android.support.v7.appcompat:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode android.support.v7.appcompat:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; /** <p> @attr description Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownHorizontalOffset}. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p> @attr description List selector to use for spinnerMode="dropdown" display. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownSelector}. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p> @attr description Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownVerticalOffset}. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p> @attr description Width of the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownWidth}. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p> @attr description Gravity setting for positioning the currently selected item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#gravity}. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p> @attr description Background drawable to use for the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#popupBackground}. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p> @attr description Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p> @attr description Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p> @attr description The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:prompt */ public static final int Spinner_prompt = 6; /** <p> @attr description Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.appcompat:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** These are the standard attributes that make up a complete theme. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Theme_actionDropDownStyle android.support.v7.appcompat:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight android.support.v7.appcompat:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator android.support.v7.appcompat:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme android.support.v7.appcompat:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth android.support.v7.appcompat:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle android.support.v7.appcompat:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; /** <p> @attr description Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p> @attr description The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p> @attr description Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p> @attr description Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p> @attr description Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p> @attr description Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.appcompat:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_paddingEnd android.support.v7.appcompat:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart android.support.v7.appcompat:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; /** <p> @attr description Boolean that controls whether a view can take focus. By default the user can not move focus to a view; by setting this attribute to true the view is allowed to take focus. This value does not impact the behavior of directly calling {@link android.view.View#requestFocus}, which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#focusable}. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p> @attr description Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:paddingEnd */ public static final int View_paddingEnd = 2; /** <p> @attr description Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.appcompat:paddingStart */ public static final int View_paddingStart = 1; }; }
160,167
55.219024
262
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/android-support-v7-appcompat/gen/android/support/v7/appcompat/BuildConfig.java
/** Automatically generated file. DO NOT MODIFY */ package android.support.v7.appcompat; public final class BuildConfig { public final static boolean DEBUG = true; }
170
27.5
50
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/android-support-v7-mediarouter/gen/android/support/v7/mediarouter/R.java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.v7.mediarouter; public final class R { public static final class anim { public static int abc_fade_in=0x7f040000; public static int abc_fade_out=0x7f040001; public static int abc_slide_in_bottom=0x7f040002; public static int abc_slide_in_top=0x7f040003; public static int abc_slide_out_bottom=0x7f040004; public static int abc_slide_out_top=0x7f040005; } public static final class attr { /** Custom divider drawable to use for elements in the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarDivider=0x7f01000b; /** Custom item state list drawable background for action bar items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarItemBackground=0x7f01000c; /** Size of the Action Bar, including the contextual bar used to present Action Modes. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionBarSize=0x7f01000a; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarSplitStyle=0x7f010008; /** Reference to a style for the Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarStyle=0x7f010007; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabBarStyle=0x7f010004; /** Default style for tabs within an action bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarTabTextStyle=0x7f010005; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionBarWidgetTheme=0x7f010009; /** Default action button style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionButtonStyle=0x7f010012; /** Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionDropDownStyle=0x7f010043; /** An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionLayout=0x7f01004a; /** TextAppearance style that will be applied to text that appears within action menu items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionMenuTextAppearance=0x7f01000d; /** Color for text that appears within action menu items. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int actionMenuTextColor=0x7f01000e; /** Background drawable to use for action mode UI <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeBackground=0x7f010038; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCloseButtonStyle=0x7f010037; /** Drawable to use for the close action mode button <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCloseDrawable=0x7f01003a; /** Drawable to use for the Copy action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCopyDrawable=0x7f01003c; /** Drawable to use for the Cut action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeCutDrawable=0x7f01003b; /** Drawable to use for the Find action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeFindDrawable=0x7f010040; /** Drawable to use for the Paste action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModePasteDrawable=0x7f01003d; /** PopupWindow style to use for action modes when showing as a window overlay. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModePopupWindowStyle=0x7f010042; /** Drawable to use for the Select all action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeSelectAllDrawable=0x7f01003e; /** Drawable to use for the Share action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeShareDrawable=0x7f01003f; /** Background drawable to use for action mode UI in the lower split bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeSplitBackground=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeStyle=0x7f010036; /** Drawable to use for the Web Search action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionModeWebSearchDrawable=0x7f010041; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int actionOverflowButtonStyle=0x7f010006; /** The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionProviderClass=0x7f01004c; /** The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int actionViewClass=0x7f01004b; /** Default ActivityChooserView style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int activityChooserViewStyle=0x7f010068; /** Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int background=0x7f01002b; /** Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int backgroundSplit=0x7f01002d; /** Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int backgroundStacked=0x7f01002c; /** A style that may be applied to Buttons placed within a LinearLayout with the style buttonBarStyle to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int buttonBarButtonStyle=0x7f010014; /** A style that may be applied to horizontal LinearLayouts to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int buttonBarStyle=0x7f010013; /** Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int customNavigationLayout=0x7f01002e; /** Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int disableChildrenWhenDisabled=0x7f010050; /** Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static int displayOptions=0x7f010024; /** Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int divider=0x7f01002a; /** A drawable that may be used as a horizontal divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dividerHorizontal=0x7f010017; /** Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int dividerPadding=0x7f010052; /** A drawable that may be used as a vertical divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dividerVertical=0x7f010016; /** ListPopupWindow comaptibility <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int dropDownListViewStyle=0x7f01001d; /** The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int dropdownListPreferredItemHeight=0x7f010044; /** The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int expandActivityOverflowButtonDrawable=0x7f010067; /** This drawable is a state list where the "checked" state indicates active media routing. Checkable indicates connecting and non-checked / non-checkable indicates that media is playing to the local device only. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int externalRouteEnabledDrawable=0x7f01006a; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int height=0x7f010022; /** Specifies a drawable to use for the 'home as up' indicator. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int homeAsUpIndicator=0x7f01000f; /** Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int homeLayout=0x7f01002f; /** Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int icon=0x7f010028; /** The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int iconifiedByDefault=0x7f010056; /** Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int indeterminateProgressStyle=0x7f010031; /** The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int initialActivityCount=0x7f010066; /** Specifies whether the theme is light, otherwise it is dark. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int isLightTheme=0x7f010055; /** Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int itemPadding=0x7f010033; /** Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int listChoiceBackgroundIndicator=0x7f010048; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int listPopupWindowStyle=0x7f01001e; /** The preferred list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeight=0x7f010018; /** A larger, more robust list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeightLarge=0x7f01001a; /** A smaller, sleeker list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemHeightSmall=0x7f010019; /** The preferred padding along the left edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemPaddingLeft=0x7f01001b; /** The preferred padding along the right edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int listPreferredItemPaddingRight=0x7f01001c; /** Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int logo=0x7f010029; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int mediaRouteButtonStyle=0x7f01006b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int mediaRouteConnectingDrawable=0x7f01006d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int mediaRouteOffDrawable=0x7f01006c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int mediaRouteOnDrawable=0x7f01006e; /** The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> */ public static int navigationMode=0x7f010023; /** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int paddingEnd=0x7f010035; /** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int paddingStart=0x7f010034; /** Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int panelMenuListTheme=0x7f010047; /** Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int panelMenuListWidth=0x7f010046; /** Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int popupMenuStyle=0x7f010045; /** Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int popupPromptView=0x7f01004f; /** Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int progressBarPadding=0x7f010032; /** Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int progressBarStyle=0x7f010030; /** The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int prompt=0x7f01004d; /** An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int queryHint=0x7f010057; /** SearchView dropdown background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchDropdownBackground=0x7f010058; /** The list item height for search results. @hide <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int searchResultListItemHeight=0x7f010061; /** SearchView AutoCompleteTextView style <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewAutoCompleteTextView=0x7f010065; /** SearchView close button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewCloseIcon=0x7f010059; /** SearchView query refinement icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewEditQuery=0x7f01005d; /** SearchView query refinement icon background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewEditQueryBackground=0x7f01005e; /** SearchView Go button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewGoIcon=0x7f01005a; /** SearchView Search icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewSearchIcon=0x7f01005b; /** SearchView text field background for the left section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewTextField=0x7f01005f; /** SearchView text field background for the right section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewTextFieldRight=0x7f010060; /** SearchView Voice button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int searchViewVoiceIcon=0x7f01005c; /** A style that may be applied to buttons or other selectable items that should react to pressed and focus states, but that do not have a clear visual border along the edges. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int selectableItemBackground=0x7f010015; /** How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> */ public static int showAsAction=0x7f010049; /** Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static int showDividers=0x7f010051; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int spinnerDropDownItemStyle=0x7f010054; /** Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> */ public static int spinnerMode=0x7f01004e; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int spinnerStyle=0x7f010053; /** Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int subtitle=0x7f010025; /** Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int subtitleTextStyle=0x7f010027; /** Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static int textAllCaps=0x7f010069; /** Text color, typeface, size, and style for the text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceLargePopupMenu=0x7f010010; /** The preferred TextAppearance for the primary text of list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceListItem=0x7f01001f; /** The preferred TextAppearance for the primary text of small list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceListItemSmall=0x7f010020; /** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSearchResultSubtitle=0x7f010063; /** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSearchResultTitle=0x7f010062; /** Text color, typeface, size, and style for small text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int textAppearanceSmallPopupMenu=0x7f010011; /** Text color for urls in search suggestions, used by things like global search <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static int textColorSearchUrl=0x7f010064; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int title=0x7f010021; /** Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static int titleTextStyle=0x7f010026; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowActionBar=0x7f010000; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowActionBarOverlay=0x7f010001; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static int windowSplitActionBar=0x7f010002; } public static final class bool { public static int abc_action_bar_embed_tabs_pre_jb=0x7f060000; public static int abc_action_bar_expanded_action_views_exclusive=0x7f060001; /** Whether action menu items should be displayed in ALLCAPS or not. Defaults to true. If this is not appropriate for specific locales it should be disabled in that locale's resources. */ public static int abc_config_actionMenuItemAllCaps=0x7f060005; /** Whether action menu items should obey the "withText" showAsAction flag. This may be set to false for situations where space is extremely limited. Whether action menu items should obey the "withText" showAsAction. This may be set to false for situations where space is extremely limited. */ public static int abc_config_allowActionMenuItemTextWithIcon=0x7f060004; public static int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003; public static int abc_split_action_bar_is_narrow=0x7f060002; } public static final class color { public static int abc_search_url_text_holo=0x7f070003; public static int abc_search_url_text_normal=0x7f070000; public static int abc_search_url_text_pressed=0x7f070002; public static int abc_search_url_text_selected=0x7f070001; } public static final class dimen { /** Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. */ public static int abc_action_bar_default_height=0x7f080002; /** Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. */ public static int abc_action_bar_icon_vertical_padding=0x7f080003; /** Maximum height for a stacked tab bar as part of an action bar */ public static int abc_action_bar_stacked_max_height=0x7f080009; /** Maximum width for a stacked action bar tab. This prevents action bar tabs from becoming too wide on a wide screen when only a few are present. */ public static int abc_action_bar_stacked_tab_max_width=0x7f080001; /** Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles */ public static int abc_action_bar_subtitle_bottom_margin=0x7f080007; /** Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles */ public static int abc_action_bar_subtitle_text_size=0x7f080005; /** Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles */ public static int abc_action_bar_subtitle_top_margin=0x7f080006; /** Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles */ public static int abc_action_bar_title_text_size=0x7f080004; /** Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar */ public static int abc_action_button_min_width=0x7f080008; /** The maximum width we would prefer dialogs to be. 0 if there is no maximum (let them grow as large as the screen). Actual values are specified for -large and -xlarge configurations. see comment in values/config.xml see comment in values/config.xml */ public static int abc_config_prefDialogWidth=0x7f080000; /** Width of the icon in a dropdown list */ public static int abc_dropdownitem_icon_width=0x7f08000f; /** Text padding for dropdown items */ public static int abc_dropdownitem_text_padding_left=0x7f08000d; public static int abc_dropdownitem_text_padding_right=0x7f08000e; public static int abc_panel_menu_list_width=0x7f08000a; /** Preferred width of the search view. */ public static int abc_search_view_preferred_width=0x7f08000c; /** Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. */ public static int abc_search_view_text_min_width=0x7f08000b; } public static final class drawable { public static int abc_ab_bottom_solid_dark_holo=0x7f020000; public static int abc_ab_bottom_solid_light_holo=0x7f020001; public static int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static int abc_ab_bottom_transparent_light_holo=0x7f020003; public static int abc_ab_share_pack_holo_dark=0x7f020004; public static int abc_ab_share_pack_holo_light=0x7f020005; public static int abc_ab_solid_dark_holo=0x7f020006; public static int abc_ab_solid_light_holo=0x7f020007; public static int abc_ab_stacked_solid_dark_holo=0x7f020008; public static int abc_ab_stacked_solid_light_holo=0x7f020009; public static int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static int abc_ab_transparent_dark_holo=0x7f02000c; public static int abc_ab_transparent_light_holo=0x7f02000d; public static int abc_cab_background_bottom_holo_dark=0x7f02000e; public static int abc_cab_background_bottom_holo_light=0x7f02000f; public static int abc_cab_background_top_holo_dark=0x7f020010; public static int abc_cab_background_top_holo_light=0x7f020011; public static int abc_ic_ab_back_holo_dark=0x7f020012; public static int abc_ic_ab_back_holo_light=0x7f020013; public static int abc_ic_cab_done_holo_dark=0x7f020014; public static int abc_ic_cab_done_holo_light=0x7f020015; public static int abc_ic_clear=0x7f020016; public static int abc_ic_clear_disabled=0x7f020017; public static int abc_ic_clear_holo_light=0x7f020018; public static int abc_ic_clear_normal=0x7f020019; public static int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static int abc_ic_clear_search_api_holo_light=0x7f02001b; public static int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static int abc_ic_commit_search_api_holo_light=0x7f02001d; public static int abc_ic_go=0x7f02001e; public static int abc_ic_go_search_api_holo_light=0x7f02001f; public static int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static int abc_ic_menu_share_holo_dark=0x7f020022; public static int abc_ic_menu_share_holo_light=0x7f020023; public static int abc_ic_search=0x7f020024; public static int abc_ic_search_api_holo_light=0x7f020025; public static int abc_ic_voice_search=0x7f020026; public static int abc_ic_voice_search_api_holo_light=0x7f020027; public static int abc_item_background_holo_dark=0x7f020028; public static int abc_item_background_holo_light=0x7f020029; public static int abc_list_divider_holo_dark=0x7f02002a; public static int abc_list_divider_holo_light=0x7f02002b; public static int abc_list_focused_holo=0x7f02002c; public static int abc_list_longpressed_holo=0x7f02002d; public static int abc_list_pressed_holo_dark=0x7f02002e; public static int abc_list_pressed_holo_light=0x7f02002f; public static int abc_list_selector_background_transition_holo_dark=0x7f020030; public static int abc_list_selector_background_transition_holo_light=0x7f020031; public static int abc_list_selector_disabled_holo_dark=0x7f020032; public static int abc_list_selector_disabled_holo_light=0x7f020033; public static int abc_list_selector_holo_dark=0x7f020034; public static int abc_list_selector_holo_light=0x7f020035; public static int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static int abc_menu_dropdown_panel_holo_light=0x7f020037; public static int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static int abc_menu_hardkey_panel_holo_light=0x7f020039; public static int abc_search_dropdown_dark=0x7f02003a; public static int abc_search_dropdown_light=0x7f02003b; public static int abc_spinner_ab_default_holo_dark=0x7f02003c; public static int abc_spinner_ab_default_holo_light=0x7f02003d; public static int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static int abc_spinner_ab_focused_holo_dark=0x7f020040; public static int abc_spinner_ab_focused_holo_light=0x7f020041; public static int abc_spinner_ab_holo_dark=0x7f020042; public static int abc_spinner_ab_holo_light=0x7f020043; public static int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static int abc_spinner_ab_pressed_holo_light=0x7f020045; public static int abc_tab_indicator_ab_holo=0x7f020046; public static int abc_tab_selected_focused_holo=0x7f020047; public static int abc_tab_selected_holo=0x7f020048; public static int abc_tab_selected_pressed_holo=0x7f020049; public static int abc_tab_unselected_pressed_holo=0x7f02004a; public static int abc_textfield_search_default_holo_dark=0x7f02004b; public static int abc_textfield_search_default_holo_light=0x7f02004c; public static int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static int abc_textfield_search_right_default_holo_light=0x7f02004e; public static int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static int abc_textfield_search_right_selected_holo_light=0x7f020050; public static int abc_textfield_search_selected_holo_dark=0x7f020051; public static int abc_textfield_search_selected_holo_light=0x7f020052; public static int abc_textfield_searchview_holo_dark=0x7f020053; public static int abc_textfield_searchview_holo_light=0x7f020054; public static int abc_textfield_searchview_right_holo_dark=0x7f020055; public static int abc_textfield_searchview_right_holo_light=0x7f020056; public static int mr_ic_audio_vol=0x7f020057; public static int mr_ic_media_route_connecting_holo_dark=0x7f020058; public static int mr_ic_media_route_connecting_holo_light=0x7f020059; public static int mr_ic_media_route_disabled_holo_dark=0x7f02005a; public static int mr_ic_media_route_disabled_holo_light=0x7f02005b; public static int mr_ic_media_route_holo_dark=0x7f02005c; public static int mr_ic_media_route_holo_light=0x7f02005d; public static int mr_ic_media_route_off_holo_dark=0x7f02005e; public static int mr_ic_media_route_off_holo_light=0x7f02005f; public static int mr_ic_media_route_on_0_holo_dark=0x7f020060; public static int mr_ic_media_route_on_0_holo_light=0x7f020061; public static int mr_ic_media_route_on_1_holo_dark=0x7f020062; public static int mr_ic_media_route_on_1_holo_light=0x7f020063; public static int mr_ic_media_route_on_2_holo_dark=0x7f020064; public static int mr_ic_media_route_on_2_holo_light=0x7f020065; public static int mr_ic_media_route_on_holo_dark=0x7f020066; public static int mr_ic_media_route_on_holo_light=0x7f020067; } public static final class id { public static int action_bar=0x7f05001a; public static int action_bar_activity_content=0x7f050015; public static int action_bar_container=0x7f050019; public static int action_bar_overlay_layout=0x7f05001d; public static int action_bar_root=0x7f050018; public static int action_bar_subtitle=0x7f050021; public static int action_bar_title=0x7f050020; public static int action_context_bar=0x7f05001b; public static int action_menu_divider=0x7f050016; public static int action_menu_presenter=0x7f050017; public static int action_mode_bar=0x7f05002f; public static int action_mode_bar_stub=0x7f05002e; public static int action_mode_close_button=0x7f050022; public static int activity_chooser_view_content=0x7f050023; public static int always=0x7f05000b; public static int beginning=0x7f050011; public static int checkbox=0x7f05002b; public static int collapseActionView=0x7f05000d; public static int default_activity_button=0x7f050026; public static int dialog=0x7f05000e; public static int disableHome=0x7f050008; public static int dropdown=0x7f05000f; public static int edit_query=0x7f050036; public static int end=0x7f050013; public static int expand_activities_button=0x7f050024; public static int expanded_menu=0x7f05002a; public static int home=0x7f050014; public static int homeAsUp=0x7f050005; public static int icon=0x7f050028; public static int ifRoom=0x7f05000a; public static int image=0x7f050025; public static int left_icon=0x7f050031; public static int listMode=0x7f050001; public static int list_item=0x7f050027; public static int media_route_control_frame=0x7f050045; public static int media_route_disconnect_button=0x7f050046; public static int media_route_list=0x7f050042; public static int media_route_volume_layout=0x7f050043; public static int media_route_volume_slider=0x7f050044; public static int middle=0x7f050012; public static int never=0x7f050009; public static int none=0x7f050010; public static int normal=0x7f050000; public static int progress_circular=0x7f050034; public static int progress_horizontal=0x7f050035; public static int radio=0x7f05002d; public static int right_container=0x7f050032; public static int right_icon=0x7f050033; public static int search_badge=0x7f050038; public static int search_bar=0x7f050037; public static int search_button=0x7f050039; public static int search_close_btn=0x7f05003e; public static int search_edit_frame=0x7f05003a; public static int search_go_btn=0x7f050040; public static int search_mag_icon=0x7f05003b; public static int search_plate=0x7f05003c; public static int search_src_text=0x7f05003d; public static int search_voice_btn=0x7f050041; public static int shortcut=0x7f05002c; public static int showCustom=0x7f050007; public static int showHome=0x7f050004; public static int showTitle=0x7f050006; public static int split_action_bar=0x7f05001c; public static int submit_area=0x7f05003f; public static int tabMode=0x7f050002; public static int title=0x7f050029; public static int title_container=0x7f050030; public static int top_action_bar=0x7f05001e; public static int up=0x7f05001f; public static int useLogo=0x7f050003; public static int withText=0x7f05000c; } public static final class integer { /** The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. */ public static int abc_max_action_buttons=0x7f090000; } public static final class layout { public static int abc_action_bar_decor=0x7f030000; public static int abc_action_bar_decor_include=0x7f030001; public static int abc_action_bar_decor_overlay=0x7f030002; public static int abc_action_bar_home=0x7f030003; public static int abc_action_bar_tab=0x7f030004; public static int abc_action_bar_tabbar=0x7f030005; public static int abc_action_bar_title_item=0x7f030006; public static int abc_action_bar_view_list_nav_layout=0x7f030007; public static int abc_action_menu_item_layout=0x7f030008; public static int abc_action_menu_layout=0x7f030009; public static int abc_action_mode_bar=0x7f03000a; public static int abc_action_mode_close_item=0x7f03000b; public static int abc_activity_chooser_view=0x7f03000c; public static int abc_activity_chooser_view_include=0x7f03000d; public static int abc_activity_chooser_view_list_item=0x7f03000e; public static int abc_expanded_menu_layout=0x7f03000f; public static int abc_list_menu_item_checkbox=0x7f030010; public static int abc_list_menu_item_icon=0x7f030011; public static int abc_list_menu_item_layout=0x7f030012; public static int abc_list_menu_item_radio=0x7f030013; public static int abc_popup_menu_item_layout=0x7f030014; public static int abc_screen=0x7f030015; public static int abc_search_dropdown_item_icons_2line=0x7f030016; public static int abc_search_view=0x7f030017; public static int mr_media_route_chooser_dialog=0x7f030018; public static int mr_media_route_controller_dialog=0x7f030019; public static int mr_media_route_list_item=0x7f03001a; public static int support_simple_spinner_dropdown_item=0x7f03001b; } public static final class string { /** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] */ public static int abc_action_bar_home_description=0x7f0a0001; /** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] */ public static int abc_action_bar_up_description=0x7f0a0002; /** Content description for the action menu overflow button. [CHAR LIMIT=NONE] */ public static int abc_action_menu_overflow_description=0x7f0a0003; /** Label for the "Done" button on the far left of action mode toolbars. */ public static int abc_action_mode_done=0x7f0a0000; /** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] */ public static int abc_activity_chooser_view_see_all=0x7f0a000a; /** ActivityChooserView - accessibility support Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] */ public static int abc_activitychooserview_choose_application=0x7f0a0009; /** SearchView accessibility description for clear button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_clear=0x7f0a0006; /** SearchView accessibility description for search text field [CHAR LIMIT=NONE] */ public static int abc_searchview_description_query=0x7f0a0005; /** SearchView accessibility description for search button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_search=0x7f0a0004; /** SearchView accessibility description for submit button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_submit=0x7f0a0007; /** SearchView accessibility description for voice button [CHAR LIMIT=NONE] */ public static int abc_searchview_description_voice=0x7f0a0008; /** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static int abc_shareactionprovider_share_with=0x7f0a000c; /** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static int abc_shareactionprovider_share_with_application=0x7f0a000b; /** Content description of a MediaRouteButton for accessibility support. [CHAR LIMIT=50] */ public static int mr_media_route_button_content_description=0x7f0a000f; /** Placeholder text to show when no devices have been found. [CHAR LIMIT=50] */ public static int mr_media_route_chooser_searching=0x7f0a0011; /** Title of the media route chooser dialog. [CHAR LIMIT=30] */ public static int mr_media_route_chooser_title=0x7f0a0010; /** Button to disconnect from a media route. [CHAR LIMIT=30] */ public static int mr_media_route_controller_disconnect=0x7f0a0012; /** Name for the default system route prior to Jellybean. [CHAR LIMIT=30] */ public static int mr_system_route_name=0x7f0a000d; /** Name for the user route category created when publishing routes to the system in Jellybean and above. [CHAR LIMIT=30] */ public static int mr_user_route_category_name=0x7f0a000e; } public static final class style { /** Mimic text appearance in select_dialog_item.xml */ public static int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0061; public static int TextAppearance_AppCompat_Base_SearchResult=0x7f0b0069; public static int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006b; /** Search View result styles */ public static int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006a; public static int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0065; public static int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b0066; public static int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b006c; public static int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b006e; /** TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default versions instead (which are exactly the same). */ public static int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b006d; public static int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b0067; public static int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b0068; public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0033; public static int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0032; public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b002e; public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b002f; public static int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0031; public static int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0030; public static int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a; public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006; public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008; public static int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005; public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007; public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e; public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020; public static int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d; public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0052; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0054; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0056; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0053; public static int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0055; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b004f; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0051; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b004e; public static int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0050; public static int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b005f; public static int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021; public static int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002c; public static int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002d; public static int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0060; public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028; /** Themes in the "Theme.AppCompat" family will contain an action bar by default. If Holo themes are available on the current platform version they will be used. A limited Holo-styled action bar will be provided on platform versions older than 3.0. (API 11) These theme declarations contain any version-independent specification. Items that need to vary based on platform version should be defined in the corresponding "Theme.Base" theme. Platform-independent theme providing an action bar in a dark-themed activity. */ public static int Theme_AppCompat=0x7f0b0073; /** Menu/item attributes */ public static int Theme_AppCompat_Base_CompactMenu=0x7f0b007d; public static int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b007e; /** Menu/item attributes */ public static int Theme_AppCompat_CompactMenu=0x7f0b0076; public static int Theme_AppCompat_CompactMenu_Dialog=0x7f0b0077; /** Platform-independent theme providing an action bar in a light-themed activity. */ public static int Theme_AppCompat_Light=0x7f0b0074; /** Platform-independent theme providing an action bar in a dark-themed activity. */ public static int Theme_AppCompat_Light_DarkActionBar=0x7f0b0075; /** Base platform-dependent theme */ public static int Theme_Base=0x7f0b0078; /** Base platform-dependent theme providing an action bar in a dark-themed activity. Base platform-dependent theme providing an action bar in a dark-themed activity. */ public static int Theme_Base_AppCompat=0x7f0b007a; /** Base platform-dependent theme providing an action bar in a light-themed activity. Base platform-dependent theme providing an action bar in a light-themed activity. */ public static int Theme_Base_AppCompat_Light=0x7f0b007b; /** Base platform-dependent theme providing a dark action bar in a light-themed activity. Base platform-dependent theme providing a dark action bar in a light-themed activity. */ public static int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b007c; /** Base platform-dependent theme providing a light-themed activity. */ public static int Theme_Base_Light=0x7f0b0079; public static int Theme_MediaRouter=0x7f0b0081; public static int Theme_MediaRouter_Light=0x7f0b0082; /** Styles in here can be extended for customisation in your application. Each utilises one of the Base styles. If Holo themes are available on the current platform version they will be used instead of the compat styles. */ public static int Widget_AppCompat_ActionBar=0x7f0b0000; public static int Widget_AppCompat_ActionBar_Solid=0x7f0b0002; public static int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011; public static int Widget_AppCompat_ActionBar_TabText=0x7f0b0017; public static int Widget_AppCompat_ActionBar_TabView=0x7f0b0014; public static int Widget_AppCompat_ActionButton=0x7f0b000b; public static int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d; public static int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f; public static int Widget_AppCompat_ActionMode=0x7f0b001b; public static int Widget_AppCompat_ActivityChooserView=0x7f0b0036; public static int Widget_AppCompat_AutoCompleteTextView=0x7f0b0034; public static int Widget_AppCompat_Base_ActionBar=0x7f0b0038; public static int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003a; public static int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0043; public static int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b0049; public static int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0046; /** Action Button Styles */ public static int Widget_AppCompat_Base_ActionButton=0x7f0b003d; public static int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b003f; public static int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0041; public static int Widget_AppCompat_Base_ActionMode=0x7f0b004c; public static int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0071; /** AutoCompleteTextView styles (for SearchView) */ public static int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b006f; public static int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005b; /** Spinner Widgets */ public static int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005d; public static int Widget_AppCompat_Base_ListView_Menu=0x7f0b0062; /** Popup Menu */ public static int Widget_AppCompat_Base_PopupMenu=0x7f0b0063; public static int Widget_AppCompat_Base_ProgressBar=0x7f0b0058; /** Progress Bar */ public static int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0057; /** Action Bar Spinner Widgets */ public static int Widget_AppCompat_Base_Spinner=0x7f0b0059; public static int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024; public static int Widget_AppCompat_Light_ActionBar=0x7f0b0001; public static int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003; public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004; public static int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012; public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013; public static int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018; public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019; public static int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015; public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016; public static int Widget_AppCompat_Light_ActionButton=0x7f0b000c; public static int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e; public static int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010; public static int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c; public static int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0037; public static int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0035; public static int Widget_AppCompat_Light_Base_ActionBar=0x7f0b0039; public static int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003b; public static int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003c; public static int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0044; public static int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0045; public static int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004a; public static int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004b; public static int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0047; public static int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b0048; public static int Widget_AppCompat_Light_Base_ActionButton=0x7f0b003e; public static int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0040; public static int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0042; public static int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004d; public static int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0072; public static int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0070; public static int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005c; public static int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b005e; public static int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0064; public static int Widget_AppCompat_Light_Base_Spinner=0x7f0b005a; public static int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025; public static int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027; public static int Widget_AppCompat_Light_PopupMenu=0x7f0b002a; public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023; public static int Widget_AppCompat_ListView_DropDown=0x7f0b0026; public static int Widget_AppCompat_ListView_Menu=0x7f0b002b; public static int Widget_AppCompat_PopupMenu=0x7f0b0029; public static int Widget_AppCompat_ProgressBar=0x7f0b000a; public static int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009; public static int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022; public static int Widget_MediaRouter_Light_MediaRouteButton=0x7f0b0080; public static int Widget_MediaRouter_MediaRouteButton=0x7f0b007f; } public static final class styleable { /** ============================================ Attributes used to style the Action Bar. These should be set on your theme; the default actionBarStyle will propagate them to the correct elements as needed. Please Note: when overriding attributes for an ActionBar style you must specify each attribute twice: once with the "android:" namespace prefix and once without. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBar_background android.support.v7.mediarouter:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit android.support.v7.mediarouter:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked android.support.v7.mediarouter:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout android.support.v7.mediarouter:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions android.support.v7.mediarouter:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_divider android.support.v7.mediarouter:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_height android.support.v7.mediarouter:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout android.support.v7.mediarouter:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_icon android.support.v7.mediarouter:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle android.support.v7.mediarouter:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_itemPadding android.support.v7.mediarouter:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of system-provided items in the bar.</td></tr> <tr><td><code>{@link #ActionBar_logo android.support.v7.mediarouter:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode android.support.v7.mediarouter:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding android.support.v7.mediarouter:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle android.support.v7.mediarouter:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_subtitle android.support.v7.mediarouter:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle android.support.v7.mediarouter:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_title android.support.v7.mediarouter:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle android.support.v7.mediarouter:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; /** <p> @attr description Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:background */ public static final int ActionBar_background = 10; /** <p> @attr description Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p> @attr description Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p> @attr description Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p> @attr description Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.mediarouter:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p> @attr description Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:divider */ public static final int ActionBar_divider = 9; /** <p> @attr description Specifies a fixed height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:height */ public static final int ActionBar_height = 1; /** <p> @attr description Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p> @attr description Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:icon */ public static final int ActionBar_icon = 7; /** <p> @attr description Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p> @attr description Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p> @attr description Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:logo */ public static final int ActionBar_logo = 8; /** <p> @attr description The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.mediarouter:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p> @attr description Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p> @attr description Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p> @attr description Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:subtitle */ public static final int ActionBar_subtitle = 4; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p> @attr description Specifies title text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:title */ public static final int ActionBar_title = 0; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Valid LayoutParams for views placed in the action bar as custom views. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr> </table> @see #ActionBarLayout_android_layout_gravity */ public static final int[] ActionBarLayout = { 0x010100b3 }; /** <p>This symbol is the offset where the {@link android.R.attr#layout_gravity} attribute's value can be found in the {@link #ActionBarLayout} array. @attr name android:layout_gravity */ public static final int ActionBarLayout_android_layout_gravity = 0; /** These attributes are meant to be specified and customized by the app. The system will read and apply them as needed. These attributes control properties of the activity window, such as whether an action bar should be present and whether it should overlay content. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar android.support.v7.mediarouter:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay android.support.v7.mediarouter:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar android.support.v7.mediarouter:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; /** <p>This symbol is the offset where the {@link android.support.v7.mediarouter.R.attr#windowActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.mediarouter:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link android.support.v7.mediarouter.R.attr#windowActionBarOverlay} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.mediarouter:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p>This symbol is the offset where the {@link android.support.v7.mediarouter.R.attr#windowSplitActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name android.support.v7.mediarouter:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Size of padding on either end of a divider. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background android.support.v7.mediarouter:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit android.support.v7.mediarouter:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height android.support.v7.mediarouter:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle android.support.v7.mediarouter:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle android.support.v7.mediarouter:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; /** <p> @attr description Specifies a background for the action mode bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:background */ public static final int ActionMode_background = 3; /** <p> @attr description Specifies a background for the split action mode bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p> @attr description Specifies a fixed height for the action mode bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:height */ public static final int ActionMode_height = 0; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attrbitutes for a ActivityChooserView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable android.support.v7.mediarouter:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount android.support.v7.mediarouter:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; /** <p> @attr description The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p> @attr description The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:initialActivityCount */ public static final int ActivityChooserView_initialActivityCount = 0; /** Attributes that can be used with a CompatTextView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #CompatTextView_textAllCaps android.support.v7.mediarouter:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f010069 }; /** <p> @attr description Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:textAllCaps */ public static final int CompatTextView_textAllCaps = 0; /** Attributes that can be used with a LinearLayoutICS. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #LinearLayoutICS_divider android.support.v7.mediarouter:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding android.support.v7.mediarouter:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers android.support.v7.mediarouter:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; /** <p> @attr description Drawable to use as a vertical divider between buttons. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:divider */ public static final int LinearLayoutICS_divider = 0; /** <p> @attr description Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p> @attr description Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.mediarouter:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Attributes that can be used with a MediaRouteButton. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MediaRouteButton_android_minHeight android:minHeight}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_android_minWidth android:minWidth}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_externalRouteEnabledDrawable android.support.v7.mediarouter:externalRouteEnabledDrawable}</code></td><td> This drawable is a state list where the "checked" state indicates active media routing.</td></tr> </table> @see #MediaRouteButton_android_minHeight @see #MediaRouteButton_android_minWidth @see #MediaRouteButton_externalRouteEnabledDrawable */ public static final int[] MediaRouteButton = { 0x0101013f, 0x01010140, 0x7f01006a }; /** <p>This symbol is the offset where the {@link android.R.attr#minHeight} attribute's value can be found in the {@link #MediaRouteButton} array. @attr name android:minHeight */ public static final int MediaRouteButton_android_minHeight = 1; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #MediaRouteButton} array. @attr name android:minWidth */ public static final int MediaRouteButton_android_minWidth = 0; /** <p> @attr description This drawable is a state list where the "checked" state indicates active media routing. Checkable indicates connecting and non-checked / non-checkable indicates that media is playing to the local device only. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:externalRouteEnabledDrawable */ public static final int MediaRouteButton_externalRouteEnabledDrawable = 2; /** Base attributes that are available to all groups. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p> @attr description Whether the items are capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkableBehavior}. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p> @attr description Whether the items are enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p> @attr description The ID of the group. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p> @attr description The category applied to all items within this group. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p> @attr description The order within the category applied to all items within this group. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p> @attr description Whether the items are shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Base attributes that are available to all Item objects. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuItem_actionLayout android.support.v7.mediarouter:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass android.support.v7.mediarouter:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item.</td></tr> <tr><td><code>{@link #MenuItem_actionViewClass android.support.v7.mediarouter:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an action view.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be called when the item is clicked.</td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction android.support.v7.mediarouter:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; /** <p> @attr description An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p> @attr description The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p> @attr description The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p> @attr description The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#alphabeticShortcut}. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p> @attr description Whether the item is capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkable}. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p> @attr description Whether the item is checked. Note that you must first have enabled checking with the checkable attribute or else the check mark will not appear. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checked}. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p> @attr description Whether the item is enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p> @attr description The icon associated with this item. This icon will not always be shown, so the title should be sufficient in describing this item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#icon}. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p> @attr description The ID of the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p> @attr description The category applied to the item. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p> @attr description The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#numericShortcut}. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p> @attr description Name of a method on the Context used to inflate the menu that will be called when the item is clicked. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#onClick}. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p> @attr description The order within the category applied to the item. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p> @attr description The title associated with the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#title}. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p> @attr description The condensed title associated with the item. This is used in situations where the normal title may be too long to be displayed. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#titleCondensed}. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p> @attr description Whether the item is shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p> @attr description How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.mediarouter:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101040c }; /** <p> @attr description Default background for the menu header. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#headerBackground}. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p> @attr description Default horizontal divider between rows of menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#horizontalDivider}. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p> @attr description Default background for each menu item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemBackground}. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p> @attr description Default disabled icon alpha for each menu item that shows an icon. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemIconDisabledAlpha}. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p> @attr description Default appearance of menu item text. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemTextAppearance}. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p> @attr description Whether space should be reserved in layout when an icon is missing. <p>This is a private symbol. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p> @attr description Default vertical divider between menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#verticalDivider}. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p> @attr description Default animations for the menu. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#windowAnimationStyle}. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault android.support.v7.mediarouter:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_queryHint android.support.v7.mediarouter:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; /** <p> @attr description The IME options to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#imeOptions}. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p> @attr description The input type to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#inputType}. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p> @attr description An optional maximum width of the SearchView. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#maxWidth}. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p> @attr description The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p> @attr description An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled android.support.v7.mediarouter:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.</td></tr> <tr><td><code>{@link #Spinner_popupPromptView android.support.v7.mediarouter:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_prompt android.support.v7.mediarouter:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode android.support.v7.mediarouter:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; /** <p> @attr description Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownHorizontalOffset}. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p> @attr description List selector to use for spinnerMode="dropdown" display. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownSelector}. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p> @attr description Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownVerticalOffset}. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p> @attr description Width of the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownWidth}. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p> @attr description Gravity setting for positioning the currently selected item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#gravity}. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p> @attr description Background drawable to use for the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#popupBackground}. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p> @attr description Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p> @attr description Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p> @attr description The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:prompt */ public static final int Spinner_prompt = 6; /** <p> @attr description Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> <p>This is a private symbol. @attr name android.support.v7.mediarouter:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** These are the standard attributes that make up a complete theme. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Theme_actionDropDownStyle android.support.v7.mediarouter:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight android.support.v7.mediarouter:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator android.support.v7.mediarouter:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme android.support.v7.mediarouter:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth android.support.v7.mediarouter:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle android.support.v7.mediarouter:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; /** <p> @attr description Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p> @attr description The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p> @attr description Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p> @attr description Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p> @attr description Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p> @attr description Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name android.support.v7.mediarouter:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_paddingEnd android.support.v7.mediarouter:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart android.support.v7.mediarouter:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; /** <p> @attr description Boolean that controls whether a view can take focus. By default the user can not move focus to a view; by setting this attribute to true the view is allowed to take focus. This value does not impact the behavior of directly calling {@link android.view.View#requestFocus}, which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#focusable}. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p> @attr description Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:paddingEnd */ public static final int View_paddingEnd = 2; /** <p> @attr description Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name android.support.v7.mediarouter:paddingStart */ public static final int View_paddingStart = 1; }; }
167,575
55.518044
264
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/android-support-v7-mediarouter/gen/android/support/v7/mediarouter/BuildConfig.java
/** Automatically generated file. DO NOT MODIFY */ package android.support.v7.mediarouter; public final class BuildConfig { public final static boolean DEBUG = true; }
172
27.833333
50
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/AndroidDashSender/src/net/digitalprimates/androiddashsender/MainActivity.java
package net.digitalprimates.androiddashsender; import java.io.IOException; import org.json.JSONException; import org.json.JSONObject; import android.content.Context; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v7.app.MediaRouteButton; import android.support.v7.media.MediaRouteSelector; import android.support.v7.media.MediaRouter; import android.support.v7.media.MediaRouter.RouteInfo; import android.util.Log; import android.view.View; import android.widget.ArrayAdapter; import android.widget.CompoundButton; import android.widget.ImageButton; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.Spinner; import android.widget.ToggleButton; import com.google.cast.ApplicationChannel; import com.google.cast.ApplicationMetadata; import com.google.cast.ApplicationSession; import com.google.cast.CastContext; import com.google.cast.CastDevice; import com.google.cast.MediaRouteAdapter; import com.google.cast.MediaRouteHelper; import com.google.cast.MediaRouteStateChangeListener; import com.google.cast.MessageStream; import com.google.cast.SessionError; public class MainActivity extends FragmentActivity implements MediaRouteAdapter { private String TAG = "DashTest"; // Streams Spinner spinner; ToggleButton playPauseToggle; ToggleButton soundToggle; SeekBar volumeBar; SeekBar scrubBar; Boolean playbackStarted = false; Boolean playing = false; private class Stream { public String name; public String url; protected Stream(String n, String u) { name = n; url = u; } public String toString() { return name; } } private void populateStreams() { spinner = (Spinner) this.findViewById(R.id.streamOptions); Stream[] items = new Stream[] { /*new Stream( "4K", "http://dash.edgesuite.net/akamai/test/tears1/tearsofsteel_4096x1714_14Mbps.mpd" ),*/ new Stream( "Fraunhofer - HEACC 2.0 - Dream", "http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_2_0_with_video/ElephantsDream/elephants_dream_480p_heaac2_0.mpd" ), new Stream( "Fraunhofer - HEACC 2.0 - Sintel", "http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_2_0_with_video/Sintel/sintel_480p_heaac2_0.mpd" ), new Stream( "Fraunhofer - HEACC 5.1 - 6 CH ID", "http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_5_1_with_video/6chId/6chId_480p_heaac5_1.mpd" ), new Stream( "Fraunhofer - HEACC 5.1 - Dream", "http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_5_1_with_video/ElephantsDream/elephants_dream_480p_heaac5_1.mpd" ), new Stream( "Fraunhofer - HEACC 5.1 - Sintel", "http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_5_1_with_video/Sintel/sintel_480p_heaac5_1.mpd" ), new Stream( "Fraunhofer - Audio Only - Dream", "http://dash.edgesuite.net/digitalprimates/fraunhofer/audio_only/heaac_2_0_without_video/ElephantsDream/elephants_dream_audio_only_heaac2_0.mpd" ), new Stream( "Fraunhofer - Audio Only - Sintel", "http://dash.edgesuite.net/digitalprimates/fraunhofer/audio_only/heaac_2_0_without_video/Sintel/sintel_audio_only_heaac2_0.mpd" ), new Stream( "Envivio", "http://dash.edgesuite.net/envivio/Envivio-dash2/manifest.mpd" ), new Stream( "Segment List", "http://www.digitalprimates.net/dash/streams/gpac/mp4-main-multi-mpd-AV-NBS.mpd" ), new Stream( "Segment Template", "http://www.digitalprimates.net/dash/streams/mp4-live-template/mp4-live-mpd-AV-BS.mpd" ), new Stream( "Segment Template", "http://www.digitalprimates.net/dash/streams/mp4-live-template/mp4-live-mpd-AV-BS.mpd" ), new Stream( "Unified Streaming - Timeline", "http://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.mpd" ), new Stream( "Microsoft #1", "http://origintest.cloudapp.net/media/SintelTrailer_MP4_from_WAME/sintel_trailer-1080p.ism/manifest(format=mpd-time-csf)" ), new Stream( "Microsoft #2", "http://origintest.cloudapp.net/media/SintelTrailer_Smooth_from_WAME/sintel_trailer-1080p.ism/manifest(format=mpd-time-csf)" ), new Stream( "Microsoft #3", "http://origintest.cloudapp.net/media/SintelTrailer_Smooth_from_WAME_720p_Main_Profile/sintel_trailer-720p.ism/manifest(format=mpd-time-csf)" ), new Stream( "Microsoft #4", "http://origintest.cloudapp.net/media/MPTExpressionData01/ElephantsDream_1080p24_IYUV_2ch.ism/manifest(format=mpd-time-csf)" ), new Stream( "Microsoft #5", "http://origintest.cloudapp.net/media/MPTExpressionData02/BigBuckBunny_1080p24_IYUV_2ch.ism/manifest(format=mpd-time-csf)" ), new Stream( "D-Dash #1", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=2&type=full" ), new Stream( "D-Dash #2", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=4&type=full" ), new Stream( "D-Dash #3", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=6&type=full" ), new Stream( "D-Dash #4", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=8&type=full" ), new Stream( "D-Dash #5", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=10&type=full" ), new Stream( "D-Dash #6", "http://www-itec.uni-klu.ac.at/dash/ddash/mpdGenerator.php?segmentlength=15&type=full" ), new Stream( "DASH-AVC/264 test vector 1a - Netflix", "http://dash.edgesuite.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd" ), new Stream( "DASH-AVC/264 test vector 1a - Sony", "http://dash.edgesuite.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd" ), new Stream( "DASH-AVC/264 test vector 1b - Envivio", "http://dash.edgesuite.net/dash264/TestCases/1b/envivio/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 1b - Thomson", "http://dash.edgesuite.net/dash264/TestCases/1b/thomson-networks/2/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 1c - Envivio", "http://dash.edgesuite.net/dash264/TestCases/1c/envivio/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 2a - Envivio", "http://dash.edgesuite.net/dash264/TestCases/2a/envivio/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 2a - Sony", "http://dash.edgesuite.net/dash264/TestCases/2a/sony/SNE_DASH_CASE_2A_SD_REVISED.mpd" ), new Stream( "DASH-AVC/264 test vector 2a - Thomson", "http://dash.edgesuite.net/dash264/TestCases/2a/thomson-networks/2/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 3a - Fraunhofer", "http://dash.edgesuite.net/dash264/TestCases/3a/fraunhofer/ed.mpd" ), new Stream( "DASH-AVC/264 test vector 3b - Fraunhofer", "http://dash.edgesuite.net/dash264/TestCases/3b/fraunhofer/elephants_dream_heaac2_0.mpd" ), new Stream( "DASH-AVC/264 test vector 3b - Sony", "http://dash.edgesuite.net/dash264/TestCases/3b/sony/SNE_DASH_CASE3B_SD_REVISED.mpd" ), new Stream( "DASH-AVC/264 test vector 4b - Sony", "http://dash.edgesuite.net/dash264/TestCases/4b/sony/SNE_DASH_CASE4B_SD_REVISED.mpd" ), new Stream( "DASH-AVC/264 test vector 5a - Thomson/Envivio", "http://dash.edgesuite.net/dash264/TestCases/5a/1/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 5b - Thomson/Envivio", "http://dash.edgesuite.net/dash264/TestCases/5b/1/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 6c - Envivio Manifest 1", "http://dash.edgesuite.net/dash264/TestCases/6c/envivio/manifest.mpd" ), new Stream( "DASH-AVC/264 test vector 6c - Envivio Manifest 2", "http://dash.edgesuite.net/dash264/TestCases/6c/envivio/manifest2.mpd" ) }; ArrayAdapter<Stream> streams = new ArrayAdapter<Stream>( this, android.R.layout.simple_spinner_item, items ); spinner.setAdapter(streams); } // Variables private String APP_ID = "75215b49-c8b8-45ae-b0fb-afb39599204e"; private CastContext context; private MediaRouter router; private MediaRouteSelector routeSelector; private MediaRouter.Callback routerCallback; private MediaRouteButton castButton; private CastDevice selectedDevice; private MediaRouteStateChangeListener stateListener; private ApplicationSession session; private DashMessageStream messageStream; // Chromecast private void initCast() { castButton = (MediaRouteButton) findViewById(R.id.media_route_button); Context appContext = getApplicationContext(); context = new CastContext(appContext); MediaRouteHelper.registerMinimalMediaRouteProvider(context, this); router = MediaRouter.getInstance(appContext); routeSelector = MediaRouteHelper.buildMediaRouteSelector(MediaRouteHelper.CATEGORY_CAST, APP_ID, null); castButton.setRouteSelector(routeSelector); routerCallback = new DashMediaRouterCallback(); router.addCallback(routeSelector, routerCallback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY); } private class DashMediaRouterCallback extends MediaRouter.Callback { @Override public void onRouteSelected(MediaRouter router, RouteInfo route) { MediaRouteHelper.requestCastDeviceForRoute(route); } @Override public void onRouteUnselected(MediaRouter router, RouteInfo route) { selectedDevice = null; stateListener = null; } } private class DashMessageStream extends MessageStream { private static final String NAMESPACE = "org.dashif.dashjs"; protected DashMessageStream() { super(NAMESPACE); } @Override public void onMessageReceived(JSONObject obj) { Log.e(TAG, "got message " + obj); try { String event = obj.getString("event"); String value = obj.getString("value"); double d = Double.parseDouble(value); int num = (int) Math.floor(d); if (event.equals("timeupdate")) { scrubBar.setProgress(num); } else if (event.equals("durationchange")) { scrubBar.setMax(num); } else if (event.equals("ended")) { // TODO } } catch (JSONException e) { } } public void send(JSONObject payload) { try { sendMessage(payload); } catch (IOException error) { Log.e(TAG, "send message failed: " + error); } } } private void connectSession() { session = new ApplicationSession(context, selectedDevice); ApplicationSession.Listener listener = new ApplicationSession.Listener() { @Override public void onSessionStarted(ApplicationMetadata appMetadata) { ApplicationChannel channel = session.getChannel(); if (channel == null) { Log.e(TAG, "channel = null"); return; } messageStream = new DashMessageStream(); channel.attachMessageStream(messageStream); setAllButtonsEnabled(true); } @Override public void onSessionStartFailed(SessionError error) { Log.e(TAG, "onStartFailed " + error); } @Override public void onSessionEnded(SessionError error) { Log.i(TAG, "onEnded " + error); } }; session.setListener(listener); try { session.startSession(APP_ID); } catch (IOException e) { Log.e(TAG, "Failed to open session", e); } } private void doPlay() { JSONObject payload = new JSONObject(); if (!playbackStarted) { Stream item = (Stream) spinner.getSelectedItem(); payload = new JSONObject(); try { payload.put("command", "load"); payload.put("manifest", item.url); payload.put("isLive", false); } catch (JSONException error) { } messageStream.send(payload); playbackStarted = true; playing = true; } else if (!playing) { payload = new JSONObject(); try { payload.put("command", "play"); } catch (JSONException error) { } messageStream.send(payload); playing = true; } } private void doPause() { if (playing) { JSONObject payload = new JSONObject(); try { payload.put("command", "pause"); } catch (JSONException error) { } messageStream.send(payload); playing = true; } } private void doMute() { JSONObject payload = new JSONObject(); try { payload.put("command", "setMuted"); payload.put("muted", true); } catch (JSONException error) { } messageStream.send(payload); } private void doUnmute() { JSONObject payload = new JSONObject(); try { payload.put("command", "setMuted"); payload.put("muted", false); } catch (JSONException error) { } messageStream.send(payload); } private void setAllButtonsEnabled(Boolean enabled) { spinner.setEnabled(enabled); playPauseToggle.setEnabled(enabled); soundToggle.setEnabled(enabled); volumeBar.setEnabled(enabled); scrubBar.setEnabled(enabled); } private void initButtons() { playPauseToggle = (ToggleButton) this.findViewById(R.id.play_pause_toggle); playPauseToggle.setOnCheckedChangeListener( new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { doPlay(); } else { doPause(); } } } ); soundToggle = (ToggleButton) this.findViewById(R.id.sound_toggle); soundToggle.setOnCheckedChangeListener( new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { doMute(); } else { doUnmute(); } } } ); volumeBar = (SeekBar) this.findViewById(R.id.volume_bar); volumeBar.setMax(100); volumeBar.setProgress(100); volumeBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { int percent = seekBar.getProgress(); double value = (double)percent / 100; JSONObject payload = new JSONObject(); try { payload.put("command", "setVolume"); payload.put("volume", value); } catch (JSONException error) { } messageStream.send(payload); } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } }); scrubBar = (SeekBar) this.findViewById(R.id.scrub_bar); scrubBar.setProgress(0); scrubBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { int value = seekBar.getProgress(); JSONObject payload = new JSONObject(); try { payload.put("command", "seek"); payload.put("time", value); } catch (JSONException error) { } messageStream.send(payload); } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } }); setAllButtonsEnabled(false); } // MediaRouteAdapter Methods public void onDeviceAvailable(CastDevice device, String app, MediaRouteStateChangeListener listener) { // TODO : What is the string? selectedDevice = device; stateListener = listener; connectSession(); } public void onSetVolume(double volume) { // Handle volume change. } public void onUpdateVolume(double delta) { // Handle volume change. } // Lifecycle @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); populateStreams(); initButtons(); initCast(); } @Override protected void onDestroy() { MediaRouteHelper.unregisterMediaRouteProvider(context); context.dispose(); super.onDestroy(); } }
17,003
29.148936
157
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/AndroidDashSender/gen/android/support/v7/appcompat/R.java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.v7.appcompat; public final class R { public static final class anim { public static final int abc_fade_in = 0x7f040000; public static final int abc_fade_out = 0x7f040001; public static final int abc_slide_in_bottom = 0x7f040002; public static final int abc_slide_in_top = 0x7f040003; public static final int abc_slide_out_bottom = 0x7f040004; public static final int abc_slide_out_top = 0x7f040005; } public static final class attr { public static final int actionBarDivider = 0x7f01000b; public static final int actionBarItemBackground = 0x7f01000c; public static final int actionBarSize = 0x7f01000a; public static final int actionBarSplitStyle = 0x7f010008; public static final int actionBarStyle = 0x7f010007; public static final int actionBarTabBarStyle = 0x7f010004; public static final int actionBarTabStyle = 0x7f010003; public static final int actionBarTabTextStyle = 0x7f010005; public static final int actionBarWidgetTheme = 0x7f010009; public static final int actionButtonStyle = 0x7f010012; public static final int actionDropDownStyle = 0x7f010043; public static final int actionLayout = 0x7f01004a; public static final int actionMenuTextAppearance = 0x7f01000d; public static final int actionMenuTextColor = 0x7f01000e; public static final int actionModeBackground = 0x7f010038; public static final int actionModeCloseButtonStyle = 0x7f010037; public static final int actionModeCloseDrawable = 0x7f01003a; public static final int actionModeCopyDrawable = 0x7f01003c; public static final int actionModeCutDrawable = 0x7f01003b; public static final int actionModeFindDrawable = 0x7f010040; public static final int actionModePasteDrawable = 0x7f01003d; public static final int actionModePopupWindowStyle = 0x7f010042; public static final int actionModeSelectAllDrawable = 0x7f01003e; public static final int actionModeShareDrawable = 0x7f01003f; public static final int actionModeSplitBackground = 0x7f010039; public static final int actionModeStyle = 0x7f010036; public static final int actionModeWebSearchDrawable = 0x7f010041; public static final int actionOverflowButtonStyle = 0x7f010006; public static final int actionProviderClass = 0x7f01004c; public static final int actionViewClass = 0x7f01004b; public static final int activityChooserViewStyle = 0x7f010068; public static final int background = 0x7f01002b; public static final int backgroundSplit = 0x7f01002d; public static final int backgroundStacked = 0x7f01002c; public static final int buttonBarButtonStyle = 0x7f010014; public static final int buttonBarStyle = 0x7f010013; public static final int customNavigationLayout = 0x7f01002e; public static final int disableChildrenWhenDisabled = 0x7f010050; public static final int displayOptions = 0x7f010024; public static final int divider = 0x7f01002a; public static final int dividerHorizontal = 0x7f010017; public static final int dividerPadding = 0x7f010052; public static final int dividerVertical = 0x7f010016; public static final int dropDownListViewStyle = 0x7f01001d; public static final int dropdownListPreferredItemHeight = 0x7f010044; public static final int expandActivityOverflowButtonDrawable = 0x7f010067; public static final int height = 0x7f010022; public static final int homeAsUpIndicator = 0x7f01000f; public static final int homeLayout = 0x7f01002f; public static final int icon = 0x7f010028; public static final int iconifiedByDefault = 0x7f010056; public static final int indeterminateProgressStyle = 0x7f010031; public static final int initialActivityCount = 0x7f010066; public static final int isLightTheme = 0x7f010055; public static final int itemPadding = 0x7f010033; public static final int listChoiceBackgroundIndicator = 0x7f010048; public static final int listPopupWindowStyle = 0x7f01001e; public static final int listPreferredItemHeight = 0x7f010018; public static final int listPreferredItemHeightLarge = 0x7f01001a; public static final int listPreferredItemHeightSmall = 0x7f010019; public static final int listPreferredItemPaddingLeft = 0x7f01001b; public static final int listPreferredItemPaddingRight = 0x7f01001c; public static final int logo = 0x7f010029; public static final int navigationMode = 0x7f010023; public static final int paddingEnd = 0x7f010035; public static final int paddingStart = 0x7f010034; public static final int panelMenuListTheme = 0x7f010047; public static final int panelMenuListWidth = 0x7f010046; public static final int popupMenuStyle = 0x7f010045; public static final int popupPromptView = 0x7f01004f; public static final int progressBarPadding = 0x7f010032; public static final int progressBarStyle = 0x7f010030; public static final int prompt = 0x7f01004d; public static final int queryHint = 0x7f010057; public static final int searchDropdownBackground = 0x7f010058; public static final int searchResultListItemHeight = 0x7f010061; public static final int searchViewAutoCompleteTextView = 0x7f010065; public static final int searchViewCloseIcon = 0x7f010059; public static final int searchViewEditQuery = 0x7f01005d; public static final int searchViewEditQueryBackground = 0x7f01005e; public static final int searchViewGoIcon = 0x7f01005a; public static final int searchViewSearchIcon = 0x7f01005b; public static final int searchViewTextField = 0x7f01005f; public static final int searchViewTextFieldRight = 0x7f010060; public static final int searchViewVoiceIcon = 0x7f01005c; public static final int selectableItemBackground = 0x7f010015; public static final int showAsAction = 0x7f010049; public static final int showDividers = 0x7f010051; public static final int spinnerDropDownItemStyle = 0x7f010054; public static final int spinnerMode = 0x7f01004e; public static final int spinnerStyle = 0x7f010053; public static final int subtitle = 0x7f010025; public static final int subtitleTextStyle = 0x7f010027; public static final int textAllCaps = 0x7f010069; public static final int textAppearanceLargePopupMenu = 0x7f010010; public static final int textAppearanceListItem = 0x7f01001f; public static final int textAppearanceListItemSmall = 0x7f010020; public static final int textAppearanceSearchResultSubtitle = 0x7f010063; public static final int textAppearanceSearchResultTitle = 0x7f010062; public static final int textAppearanceSmallPopupMenu = 0x7f010011; public static final int textColorSearchUrl = 0x7f010064; public static final int title = 0x7f010021; public static final int titleTextStyle = 0x7f010026; public static final int windowActionBar = 0x7f010000; public static final int windowActionBarOverlay = 0x7f010001; public static final int windowSplitActionBar = 0x7f010002; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f060000; public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f060001; public static final int abc_config_actionMenuItemAllCaps = 0x7f060005; public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f060004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f060003; public static final int abc_split_action_bar_is_narrow = 0x7f060002; } public static final class color { public static final int abc_search_url_text_holo = 0x7f070009; public static final int abc_search_url_text_normal = 0x7f070000; public static final int abc_search_url_text_pressed = 0x7f070002; public static final int abc_search_url_text_selected = 0x7f070001; } public static final class dimen { public static final int abc_action_bar_default_height = 0x7f080002; public static final int abc_action_bar_icon_vertical_padding = 0x7f080003; public static final int abc_action_bar_stacked_max_height = 0x7f080009; public static final int abc_action_bar_stacked_tab_max_width = 0x7f080001; public static final int abc_action_bar_subtitle_bottom_margin = 0x7f080007; public static final int abc_action_bar_subtitle_text_size = 0x7f080005; public static final int abc_action_bar_subtitle_top_margin = 0x7f080006; public static final int abc_action_bar_title_text_size = 0x7f080004; public static final int abc_action_button_min_width = 0x7f080008; public static final int abc_config_prefDialogWidth = 0x7f080000; public static final int abc_dropdownitem_icon_width = 0x7f08000f; public static final int abc_dropdownitem_text_padding_left = 0x7f08000d; public static final int abc_dropdownitem_text_padding_right = 0x7f08000e; public static final int abc_panel_menu_list_width = 0x7f08000a; public static final int abc_search_view_preferred_width = 0x7f08000c; public static final int abc_search_view_text_min_width = 0x7f08000b; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo = 0x7f020000; public static final int abc_ab_bottom_solid_light_holo = 0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo = 0x7f020002; public static final int abc_ab_bottom_transparent_light_holo = 0x7f020003; public static final int abc_ab_share_pack_holo_dark = 0x7f020004; public static final int abc_ab_share_pack_holo_light = 0x7f020005; public static final int abc_ab_solid_dark_holo = 0x7f020006; public static final int abc_ab_solid_light_holo = 0x7f020007; public static final int abc_ab_stacked_solid_dark_holo = 0x7f020008; public static final int abc_ab_stacked_solid_light_holo = 0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo = 0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo = 0x7f02000b; public static final int abc_ab_transparent_dark_holo = 0x7f02000c; public static final int abc_ab_transparent_light_holo = 0x7f02000d; public static final int abc_cab_background_bottom_holo_dark = 0x7f02000e; public static final int abc_cab_background_bottom_holo_light = 0x7f02000f; public static final int abc_cab_background_top_holo_dark = 0x7f020010; public static final int abc_cab_background_top_holo_light = 0x7f020011; public static final int abc_ic_ab_back_holo_dark = 0x7f020012; public static final int abc_ic_ab_back_holo_light = 0x7f020013; public static final int abc_ic_cab_done_holo_dark = 0x7f020014; public static final int abc_ic_cab_done_holo_light = 0x7f020015; public static final int abc_ic_clear = 0x7f020016; public static final int abc_ic_clear_disabled = 0x7f020017; public static final int abc_ic_clear_holo_light = 0x7f020018; public static final int abc_ic_clear_normal = 0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light = 0x7f02001a; public static final int abc_ic_clear_search_api_holo_light = 0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark = 0x7f02001c; public static final int abc_ic_commit_search_api_holo_light = 0x7f02001d; public static final int abc_ic_go = 0x7f02001e; public static final int abc_ic_go_search_api_holo_light = 0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark = 0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light = 0x7f020021; public static final int abc_ic_menu_share_holo_dark = 0x7f020022; public static final int abc_ic_menu_share_holo_light = 0x7f020023; public static final int abc_ic_search = 0x7f020024; public static final int abc_ic_search_api_holo_light = 0x7f020025; public static final int abc_ic_voice_search = 0x7f020026; public static final int abc_ic_voice_search_api_holo_light = 0x7f020027; public static final int abc_item_background_holo_dark = 0x7f020028; public static final int abc_item_background_holo_light = 0x7f020029; public static final int abc_list_divider_holo_dark = 0x7f02002a; public static final int abc_list_divider_holo_light = 0x7f02002b; public static final int abc_list_focused_holo = 0x7f02002c; public static final int abc_list_longpressed_holo = 0x7f02002d; public static final int abc_list_pressed_holo_dark = 0x7f02002e; public static final int abc_list_pressed_holo_light = 0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark = 0x7f020030; public static final int abc_list_selector_background_transition_holo_light = 0x7f020031; public static final int abc_list_selector_disabled_holo_dark = 0x7f020032; public static final int abc_list_selector_disabled_holo_light = 0x7f020033; public static final int abc_list_selector_holo_dark = 0x7f020034; public static final int abc_list_selector_holo_light = 0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark = 0x7f020036; public static final int abc_menu_dropdown_panel_holo_light = 0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark = 0x7f020038; public static final int abc_menu_hardkey_panel_holo_light = 0x7f020039; public static final int abc_search_dropdown_dark = 0x7f02003a; public static final int abc_search_dropdown_light = 0x7f02003b; public static final int abc_spinner_ab_default_holo_dark = 0x7f02003c; public static final int abc_spinner_ab_default_holo_light = 0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark = 0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light = 0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark = 0x7f020040; public static final int abc_spinner_ab_focused_holo_light = 0x7f020041; public static final int abc_spinner_ab_holo_dark = 0x7f020042; public static final int abc_spinner_ab_holo_light = 0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark = 0x7f020044; public static final int abc_spinner_ab_pressed_holo_light = 0x7f020045; public static final int abc_tab_indicator_ab_holo = 0x7f020046; public static final int abc_tab_selected_focused_holo = 0x7f020047; public static final int abc_tab_selected_holo = 0x7f020048; public static final int abc_tab_selected_pressed_holo = 0x7f020049; public static final int abc_tab_unselected_pressed_holo = 0x7f02004a; public static final int abc_textfield_search_default_holo_dark = 0x7f02004b; public static final int abc_textfield_search_default_holo_light = 0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark = 0x7f02004d; public static final int abc_textfield_search_right_default_holo_light = 0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark = 0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light = 0x7f020050; public static final int abc_textfield_search_selected_holo_dark = 0x7f020051; public static final int abc_textfield_search_selected_holo_light = 0x7f020052; public static final int abc_textfield_searchview_holo_dark = 0x7f020053; public static final int abc_textfield_searchview_holo_light = 0x7f020054; public static final int abc_textfield_searchview_right_holo_dark = 0x7f020055; public static final int abc_textfield_searchview_right_holo_light = 0x7f020056; } public static final class id { public static final int action_bar = 0x7f05001a; public static final int action_bar_activity_content = 0x7f050015; public static final int action_bar_container = 0x7f050019; public static final int action_bar_overlay_layout = 0x7f05001d; public static final int action_bar_root = 0x7f050018; public static final int action_bar_subtitle = 0x7f050021; public static final int action_bar_title = 0x7f050020; public static final int action_context_bar = 0x7f05001b; public static final int action_menu_divider = 0x7f050016; public static final int action_menu_presenter = 0x7f050017; public static final int action_mode_bar = 0x7f05002f; public static final int action_mode_bar_stub = 0x7f05002e; public static final int action_mode_close_button = 0x7f050022; public static final int activity_chooser_view_content = 0x7f050023; public static final int always = 0x7f05000b; public static final int beginning = 0x7f050011; public static final int checkbox = 0x7f05002b; public static final int collapseActionView = 0x7f05000d; public static final int default_activity_button = 0x7f050026; public static final int dialog = 0x7f05000e; public static final int disableHome = 0x7f050008; public static final int dropdown = 0x7f05000f; public static final int edit_query = 0x7f050036; public static final int end = 0x7f050013; public static final int expand_activities_button = 0x7f050024; public static final int expanded_menu = 0x7f05002a; public static final int home = 0x7f050014; public static final int homeAsUp = 0x7f050005; public static final int icon = 0x7f050028; public static final int ifRoom = 0x7f05000a; public static final int image = 0x7f050025; public static final int left_icon = 0x7f050031; public static final int listMode = 0x7f050001; public static final int list_item = 0x7f050027; public static final int middle = 0x7f050012; public static final int never = 0x7f050009; public static final int none = 0x7f050010; public static final int normal = 0x7f050000; public static final int progress_circular = 0x7f050034; public static final int progress_horizontal = 0x7f050035; public static final int radio = 0x7f05002d; public static final int right_container = 0x7f050032; public static final int right_icon = 0x7f050033; public static final int search_badge = 0x7f050038; public static final int search_bar = 0x7f050037; public static final int search_button = 0x7f050039; public static final int search_close_btn = 0x7f05003e; public static final int search_edit_frame = 0x7f05003a; public static final int search_go_btn = 0x7f050040; public static final int search_mag_icon = 0x7f05003b; public static final int search_plate = 0x7f05003c; public static final int search_src_text = 0x7f05003d; public static final int search_voice_btn = 0x7f050041; public static final int shortcut = 0x7f05002c; public static final int showCustom = 0x7f050007; public static final int showHome = 0x7f050004; public static final int showTitle = 0x7f050006; public static final int split_action_bar = 0x7f05001c; public static final int submit_area = 0x7f05003f; public static final int tabMode = 0x7f050002; public static final int title = 0x7f050029; public static final int title_container = 0x7f050030; public static final int top_action_bar = 0x7f05001e; public static final int up = 0x7f05001f; public static final int useLogo = 0x7f050003; public static final int withText = 0x7f05000c; } public static final class integer { public static final int abc_max_action_buttons = 0x7f090000; } public static final class layout { public static final int abc_action_bar_decor = 0x7f030000; public static final int abc_action_bar_decor_include = 0x7f030001; public static final int abc_action_bar_decor_overlay = 0x7f030002; public static final int abc_action_bar_home = 0x7f030003; public static final int abc_action_bar_tab = 0x7f030004; public static final int abc_action_bar_tabbar = 0x7f030005; public static final int abc_action_bar_title_item = 0x7f030006; public static final int abc_action_bar_view_list_nav_layout = 0x7f030007; public static final int abc_action_menu_item_layout = 0x7f030008; public static final int abc_action_menu_layout = 0x7f030009; public static final int abc_action_mode_bar = 0x7f03000a; public static final int abc_action_mode_close_item = 0x7f03000b; public static final int abc_activity_chooser_view = 0x7f03000c; public static final int abc_activity_chooser_view_include = 0x7f03000d; public static final int abc_activity_chooser_view_list_item = 0x7f03000e; public static final int abc_expanded_menu_layout = 0x7f03000f; public static final int abc_list_menu_item_checkbox = 0x7f030010; public static final int abc_list_menu_item_icon = 0x7f030011; public static final int abc_list_menu_item_layout = 0x7f030012; public static final int abc_list_menu_item_radio = 0x7f030013; public static final int abc_popup_menu_item_layout = 0x7f030014; public static final int abc_screen = 0x7f030015; public static final int abc_search_dropdown_item_icons_2line = 0x7f030016; public static final int abc_search_view = 0x7f030017; public static final int support_simple_spinner_dropdown_item = 0x7f03001c; } public static final class string { public static final int abc_action_bar_home_description = 0x7f0a0001; public static final int abc_action_bar_up_description = 0x7f0a0002; public static final int abc_action_menu_overflow_description = 0x7f0a0003; public static final int abc_action_mode_done = 0x7f0a0000; public static final int abc_activity_chooser_view_see_all = 0x7f0a000a; public static final int abc_activitychooserview_choose_application = 0x7f0a0009; public static final int abc_searchview_description_clear = 0x7f0a0006; public static final int abc_searchview_description_query = 0x7f0a0005; public static final int abc_searchview_description_search = 0x7f0a0004; public static final int abc_searchview_description_submit = 0x7f0a0007; public static final int abc_searchview_description_voice = 0x7f0a0008; public static final int abc_shareactionprovider_share_with = 0x7f0a000c; public static final int abc_shareactionprovider_share_with_application = 0x7f0a000b; } public static final class style { public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog = 0x7f0b0061; public static final int TextAppearance_AppCompat_Base_SearchResult = 0x7f0b0069; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle = 0x7f0b006b; public static final int TextAppearance_AppCompat_Base_SearchResult_Title = 0x7f0b006a; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large = 0x7f0b0065; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small = 0x7f0b0066; public static final int TextAppearance_AppCompat_Light_Base_SearchResult = 0x7f0b006c; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle = 0x7f0b006e; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title = 0x7f0b006d; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large = 0x7f0b0067; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small = 0x7f0b0068; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0b0033; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0b0032; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b002e; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b002f; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b0031; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0b0030; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b001a; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b0006; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b0008; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b0005; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b0007; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b001e; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0b0020; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b001d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0b001f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu = 0x7f0b0052; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle = 0x7f0b0054; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse = 0x7f0b0056; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title = 0x7f0b0053; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse = 0x7f0b0055; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle = 0x7f0b004f; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse = 0x7f0b0051; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title = 0x7f0b004e; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse = 0x7f0b0050; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem = 0x7f0b005f; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b0021; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b002c; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b002d; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item = 0x7f0b0060; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b0028; public static final int Theme_AppCompat = 0x7f0b0073; public static final int Theme_AppCompat_Base_CompactMenu = 0x7f0b007d; public static final int Theme_AppCompat_Base_CompactMenu_Dialog = 0x7f0b007e; public static final int Theme_AppCompat_CompactMenu = 0x7f0b0076; public static final int Theme_AppCompat_CompactMenu_Dialog = 0x7f0b0077; public static final int Theme_AppCompat_Light = 0x7f0b0074; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0b0075; public static final int Theme_Base = 0x7f0b0078; public static final int Theme_Base_AppCompat = 0x7f0b007a; public static final int Theme_Base_AppCompat_Light = 0x7f0b007b; public static final int Theme_Base_AppCompat_Light_DarkActionBar = 0x7f0b007c; public static final int Theme_Base_Light = 0x7f0b0079; public static final int Widget_AppCompat_ActionBar = 0x7f0b0000; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0b0002; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0b0011; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0b0017; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0b0014; public static final int Widget_AppCompat_ActionButton = 0x7f0b000b; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0b000d; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0b000f; public static final int Widget_AppCompat_ActionMode = 0x7f0b001b; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0b0036; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0b0034; public static final int Widget_AppCompat_Base_ActionBar = 0x7f0b0038; public static final int Widget_AppCompat_Base_ActionBar_Solid = 0x7f0b003a; public static final int Widget_AppCompat_Base_ActionBar_TabBar = 0x7f0b0043; public static final int Widget_AppCompat_Base_ActionBar_TabText = 0x7f0b0049; public static final int Widget_AppCompat_Base_ActionBar_TabView = 0x7f0b0046; public static final int Widget_AppCompat_Base_ActionButton = 0x7f0b003d; public static final int Widget_AppCompat_Base_ActionButton_CloseMode = 0x7f0b003f; public static final int Widget_AppCompat_Base_ActionButton_Overflow = 0x7f0b0041; public static final int Widget_AppCompat_Base_ActionMode = 0x7f0b004c; public static final int Widget_AppCompat_Base_ActivityChooserView = 0x7f0b0071; public static final int Widget_AppCompat_Base_AutoCompleteTextView = 0x7f0b006f; public static final int Widget_AppCompat_Base_DropDownItem_Spinner = 0x7f0b005b; public static final int Widget_AppCompat_Base_ListView_DropDown = 0x7f0b005d; public static final int Widget_AppCompat_Base_ListView_Menu = 0x7f0b0062; public static final int Widget_AppCompat_Base_PopupMenu = 0x7f0b0063; public static final int Widget_AppCompat_Base_ProgressBar = 0x7f0b0058; public static final int Widget_AppCompat_Base_ProgressBar_Horizontal = 0x7f0b0057; public static final int Widget_AppCompat_Base_Spinner = 0x7f0b0059; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0024; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0b0001; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b0003; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0b0004; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b0012; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0b0013; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b0018; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b0019; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0015; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0b0016; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0b000c; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0b000e; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0b0010; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0b001c; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0b0037; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0b0035; public static final int Widget_AppCompat_Light_Base_ActionBar = 0x7f0b0039; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid = 0x7f0b003b; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse = 0x7f0b003c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar = 0x7f0b0044; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse = 0x7f0b0045; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText = 0x7f0b004a; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse = 0x7f0b004b; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView = 0x7f0b0047; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse = 0x7f0b0048; public static final int Widget_AppCompat_Light_Base_ActionButton = 0x7f0b003e; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode = 0x7f0b0040; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow = 0x7f0b0042; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse = 0x7f0b004d; public static final int Widget_AppCompat_Light_Base_ActivityChooserView = 0x7f0b0072; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView = 0x7f0b0070; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner = 0x7f0b005c; public static final int Widget_AppCompat_Light_Base_ListView_DropDown = 0x7f0b005e; public static final int Widget_AppCompat_Light_Base_PopupMenu = 0x7f0b0064; public static final int Widget_AppCompat_Light_Base_Spinner = 0x7f0b005a; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0b0025; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0b0027; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0b002a; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0b0023; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0b0026; public static final int Widget_AppCompat_ListView_Menu = 0x7f0b002b; public static final int Widget_AppCompat_PopupMenu = 0x7f0b0029; public static final int Widget_AppCompat_ProgressBar = 0x7f0b000a; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0009; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0b0022; } public static final class styleable { public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; public static final int[] ActionBarLayout = { 0x010100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; public static final int ActionBarWindow_windowActionBar = 0; public static final int ActionBarWindow_windowActionBarOverlay = 1; public static final int ActionBarWindow_windowSplitActionBar = 2; public static final int ActionBar_background = 10; public static final int ActionBar_backgroundSplit = 12; public static final int ActionBar_backgroundStacked = 11; public static final int ActionBar_customNavigationLayout = 13; public static final int ActionBar_displayOptions = 3; public static final int ActionBar_divider = 9; public static final int ActionBar_height = 1; public static final int ActionBar_homeLayout = 14; public static final int ActionBar_icon = 7; public static final int ActionBar_indeterminateProgressStyle = 16; public static final int ActionBar_itemPadding = 18; public static final int ActionBar_logo = 8; public static final int ActionBar_navigationMode = 2; public static final int ActionBar_progressBarPadding = 17; public static final int ActionBar_progressBarStyle = 15; public static final int ActionBar_subtitle = 4; public static final int ActionBar_subtitleTextStyle = 6; public static final int ActionBar_title = 0; public static final int ActionBar_titleTextStyle = 5; public static final int[] ActionMenuItemView = { 0x0101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; public static final int ActionMode_background = 3; public static final int ActionMode_backgroundSplit = 4; public static final int ActionMode_height = 0; public static final int ActionMode_subtitleTextStyle = 2; public static final int ActionMode_titleTextStyle = 1; public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; public static final int ActivityChooserView_initialActivityCount = 0; public static final int[] CompatTextView = { 0x7f010069 }; public static final int CompatTextView_textAllCaps = 0; public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; public static final int LinearLayoutICS_divider = 0; public static final int LinearLayoutICS_dividerPadding = 2; public static final int LinearLayoutICS_showDividers = 1; public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; public static final int MenuGroup_android_checkableBehavior = 5; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_visible = 2; public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; public static final int MenuItem_actionLayout = 14; public static final int MenuItem_actionProviderClass = 16; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_visible = 4; public static final int MenuItem_showAsAction = 13; public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101041a }; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_preserveIconSpacing = 7; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_windowAnimationStyle = 0; public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; public static final int SearchView_android_imeOptions = 2; public static final int SearchView_android_inputType = 1; public static final int SearchView_android_maxWidth = 0; public static final int SearchView_iconifiedByDefault = 3; public static final int SearchView_queryHint = 4; public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; public static final int Spinner_android_dropDownHorizontalOffset = 4; public static final int Spinner_android_dropDownSelector = 1; public static final int Spinner_android_dropDownVerticalOffset = 5; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_android_gravity = 0; public static final int Spinner_android_popupBackground = 2; public static final int Spinner_disableChildrenWhenDisabled = 9; public static final int Spinner_popupPromptView = 8; public static final int Spinner_prompt = 6; public static final int Spinner_spinnerMode = 7; public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; public static final int Theme_actionDropDownStyle = 0; public static final int Theme_dropdownListPreferredItemHeight = 1; public static final int Theme_listChoiceBackgroundIndicator = 5; public static final int Theme_panelMenuListTheme = 4; public static final int Theme_panelMenuListWidth = 3; public static final int Theme_popupMenuStyle = 2; public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; public static final int View_android_focusable = 0; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 1; } }
39,543
65.12709
271
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/AndroidDashSender/gen/android/support/v7/mediarouter/R.java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.v7.mediarouter; public final class R { public static final class anim { public static final int abc_fade_in = 0x7f040000; public static final int abc_fade_out = 0x7f040001; public static final int abc_slide_in_bottom = 0x7f040002; public static final int abc_slide_in_top = 0x7f040003; public static final int abc_slide_out_bottom = 0x7f040004; public static final int abc_slide_out_top = 0x7f040005; } public static final class attr { public static final int actionBarDivider = 0x7f01000b; public static final int actionBarItemBackground = 0x7f01000c; public static final int actionBarSize = 0x7f01000a; public static final int actionBarSplitStyle = 0x7f010008; public static final int actionBarStyle = 0x7f010007; public static final int actionBarTabBarStyle = 0x7f010004; public static final int actionBarTabStyle = 0x7f010003; public static final int actionBarTabTextStyle = 0x7f010005; public static final int actionBarWidgetTheme = 0x7f010009; public static final int actionButtonStyle = 0x7f010012; public static final int actionDropDownStyle = 0x7f010043; public static final int actionLayout = 0x7f01004a; public static final int actionMenuTextAppearance = 0x7f01000d; public static final int actionMenuTextColor = 0x7f01000e; public static final int actionModeBackground = 0x7f010038; public static final int actionModeCloseButtonStyle = 0x7f010037; public static final int actionModeCloseDrawable = 0x7f01003a; public static final int actionModeCopyDrawable = 0x7f01003c; public static final int actionModeCutDrawable = 0x7f01003b; public static final int actionModeFindDrawable = 0x7f010040; public static final int actionModePasteDrawable = 0x7f01003d; public static final int actionModePopupWindowStyle = 0x7f010042; public static final int actionModeSelectAllDrawable = 0x7f01003e; public static final int actionModeShareDrawable = 0x7f01003f; public static final int actionModeSplitBackground = 0x7f010039; public static final int actionModeStyle = 0x7f010036; public static final int actionModeWebSearchDrawable = 0x7f010041; public static final int actionOverflowButtonStyle = 0x7f010006; public static final int actionProviderClass = 0x7f01004c; public static final int actionViewClass = 0x7f01004b; public static final int activityChooserViewStyle = 0x7f010068; public static final int background = 0x7f01002b; public static final int backgroundSplit = 0x7f01002d; public static final int backgroundStacked = 0x7f01002c; public static final int buttonBarButtonStyle = 0x7f010014; public static final int buttonBarStyle = 0x7f010013; public static final int customNavigationLayout = 0x7f01002e; public static final int disableChildrenWhenDisabled = 0x7f010050; public static final int displayOptions = 0x7f010024; public static final int divider = 0x7f01002a; public static final int dividerHorizontal = 0x7f010017; public static final int dividerPadding = 0x7f010052; public static final int dividerVertical = 0x7f010016; public static final int dropDownListViewStyle = 0x7f01001d; public static final int dropdownListPreferredItemHeight = 0x7f010044; public static final int expandActivityOverflowButtonDrawable = 0x7f010067; public static final int externalRouteEnabledDrawable = 0x7f01006a; public static final int height = 0x7f010022; public static final int homeAsUpIndicator = 0x7f01000f; public static final int homeLayout = 0x7f01002f; public static final int icon = 0x7f010028; public static final int iconifiedByDefault = 0x7f010056; public static final int indeterminateProgressStyle = 0x7f010031; public static final int initialActivityCount = 0x7f010066; public static final int isLightTheme = 0x7f010055; public static final int itemPadding = 0x7f010033; public static final int listChoiceBackgroundIndicator = 0x7f010048; public static final int listPopupWindowStyle = 0x7f01001e; public static final int listPreferredItemHeight = 0x7f010018; public static final int listPreferredItemHeightLarge = 0x7f01001a; public static final int listPreferredItemHeightSmall = 0x7f010019; public static final int listPreferredItemPaddingLeft = 0x7f01001b; public static final int listPreferredItemPaddingRight = 0x7f01001c; public static final int logo = 0x7f010029; public static final int mediaRouteButtonStyle = 0x7f01006b; public static final int mediaRouteConnectingDrawable = 0x7f01006d; public static final int mediaRouteOffDrawable = 0x7f01006c; public static final int mediaRouteOnDrawable = 0x7f01006e; public static final int navigationMode = 0x7f010023; public static final int paddingEnd = 0x7f010035; public static final int paddingStart = 0x7f010034; public static final int panelMenuListTheme = 0x7f010047; public static final int panelMenuListWidth = 0x7f010046; public static final int popupMenuStyle = 0x7f010045; public static final int popupPromptView = 0x7f01004f; public static final int progressBarPadding = 0x7f010032; public static final int progressBarStyle = 0x7f010030; public static final int prompt = 0x7f01004d; public static final int queryHint = 0x7f010057; public static final int searchDropdownBackground = 0x7f010058; public static final int searchResultListItemHeight = 0x7f010061; public static final int searchViewAutoCompleteTextView = 0x7f010065; public static final int searchViewCloseIcon = 0x7f010059; public static final int searchViewEditQuery = 0x7f01005d; public static final int searchViewEditQueryBackground = 0x7f01005e; public static final int searchViewGoIcon = 0x7f01005a; public static final int searchViewSearchIcon = 0x7f01005b; public static final int searchViewTextField = 0x7f01005f; public static final int searchViewTextFieldRight = 0x7f010060; public static final int searchViewVoiceIcon = 0x7f01005c; public static final int selectableItemBackground = 0x7f010015; public static final int showAsAction = 0x7f010049; public static final int showDividers = 0x7f010051; public static final int spinnerDropDownItemStyle = 0x7f010054; public static final int spinnerMode = 0x7f01004e; public static final int spinnerStyle = 0x7f010053; public static final int subtitle = 0x7f010025; public static final int subtitleTextStyle = 0x7f010027; public static final int textAllCaps = 0x7f010069; public static final int textAppearanceLargePopupMenu = 0x7f010010; public static final int textAppearanceListItem = 0x7f01001f; public static final int textAppearanceListItemSmall = 0x7f010020; public static final int textAppearanceSearchResultSubtitle = 0x7f010063; public static final int textAppearanceSearchResultTitle = 0x7f010062; public static final int textAppearanceSmallPopupMenu = 0x7f010011; public static final int textColorSearchUrl = 0x7f010064; public static final int title = 0x7f010021; public static final int titleTextStyle = 0x7f010026; public static final int windowActionBar = 0x7f010000; public static final int windowActionBarOverlay = 0x7f010001; public static final int windowSplitActionBar = 0x7f010002; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f060000; public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f060001; public static final int abc_config_actionMenuItemAllCaps = 0x7f060005; public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f060004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f060003; public static final int abc_split_action_bar_is_narrow = 0x7f060002; } public static final class color { public static final int abc_search_url_text_holo = 0x7f070009; public static final int abc_search_url_text_normal = 0x7f070000; public static final int abc_search_url_text_pressed = 0x7f070002; public static final int abc_search_url_text_selected = 0x7f070001; } public static final class dimen { public static final int abc_action_bar_default_height = 0x7f080002; public static final int abc_action_bar_icon_vertical_padding = 0x7f080003; public static final int abc_action_bar_stacked_max_height = 0x7f080009; public static final int abc_action_bar_stacked_tab_max_width = 0x7f080001; public static final int abc_action_bar_subtitle_bottom_margin = 0x7f080007; public static final int abc_action_bar_subtitle_text_size = 0x7f080005; public static final int abc_action_bar_subtitle_top_margin = 0x7f080006; public static final int abc_action_bar_title_text_size = 0x7f080004; public static final int abc_action_button_min_width = 0x7f080008; public static final int abc_config_prefDialogWidth = 0x7f080000; public static final int abc_dropdownitem_icon_width = 0x7f08000f; public static final int abc_dropdownitem_text_padding_left = 0x7f08000d; public static final int abc_dropdownitem_text_padding_right = 0x7f08000e; public static final int abc_panel_menu_list_width = 0x7f08000a; public static final int abc_search_view_preferred_width = 0x7f08000c; public static final int abc_search_view_text_min_width = 0x7f08000b; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo = 0x7f020000; public static final int abc_ab_bottom_solid_light_holo = 0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo = 0x7f020002; public static final int abc_ab_bottom_transparent_light_holo = 0x7f020003; public static final int abc_ab_share_pack_holo_dark = 0x7f020004; public static final int abc_ab_share_pack_holo_light = 0x7f020005; public static final int abc_ab_solid_dark_holo = 0x7f020006; public static final int abc_ab_solid_light_holo = 0x7f020007; public static final int abc_ab_stacked_solid_dark_holo = 0x7f020008; public static final int abc_ab_stacked_solid_light_holo = 0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo = 0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo = 0x7f02000b; public static final int abc_ab_transparent_dark_holo = 0x7f02000c; public static final int abc_ab_transparent_light_holo = 0x7f02000d; public static final int abc_cab_background_bottom_holo_dark = 0x7f02000e; public static final int abc_cab_background_bottom_holo_light = 0x7f02000f; public static final int abc_cab_background_top_holo_dark = 0x7f020010; public static final int abc_cab_background_top_holo_light = 0x7f020011; public static final int abc_ic_ab_back_holo_dark = 0x7f020012; public static final int abc_ic_ab_back_holo_light = 0x7f020013; public static final int abc_ic_cab_done_holo_dark = 0x7f020014; public static final int abc_ic_cab_done_holo_light = 0x7f020015; public static final int abc_ic_clear = 0x7f020016; public static final int abc_ic_clear_disabled = 0x7f020017; public static final int abc_ic_clear_holo_light = 0x7f020018; public static final int abc_ic_clear_normal = 0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light = 0x7f02001a; public static final int abc_ic_clear_search_api_holo_light = 0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark = 0x7f02001c; public static final int abc_ic_commit_search_api_holo_light = 0x7f02001d; public static final int abc_ic_go = 0x7f02001e; public static final int abc_ic_go_search_api_holo_light = 0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark = 0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light = 0x7f020021; public static final int abc_ic_menu_share_holo_dark = 0x7f020022; public static final int abc_ic_menu_share_holo_light = 0x7f020023; public static final int abc_ic_search = 0x7f020024; public static final int abc_ic_search_api_holo_light = 0x7f020025; public static final int abc_ic_voice_search = 0x7f020026; public static final int abc_ic_voice_search_api_holo_light = 0x7f020027; public static final int abc_item_background_holo_dark = 0x7f020028; public static final int abc_item_background_holo_light = 0x7f020029; public static final int abc_list_divider_holo_dark = 0x7f02002a; public static final int abc_list_divider_holo_light = 0x7f02002b; public static final int abc_list_focused_holo = 0x7f02002c; public static final int abc_list_longpressed_holo = 0x7f02002d; public static final int abc_list_pressed_holo_dark = 0x7f02002e; public static final int abc_list_pressed_holo_light = 0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark = 0x7f020030; public static final int abc_list_selector_background_transition_holo_light = 0x7f020031; public static final int abc_list_selector_disabled_holo_dark = 0x7f020032; public static final int abc_list_selector_disabled_holo_light = 0x7f020033; public static final int abc_list_selector_holo_dark = 0x7f020034; public static final int abc_list_selector_holo_light = 0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark = 0x7f020036; public static final int abc_menu_dropdown_panel_holo_light = 0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark = 0x7f020038; public static final int abc_menu_hardkey_panel_holo_light = 0x7f020039; public static final int abc_search_dropdown_dark = 0x7f02003a; public static final int abc_search_dropdown_light = 0x7f02003b; public static final int abc_spinner_ab_default_holo_dark = 0x7f02003c; public static final int abc_spinner_ab_default_holo_light = 0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark = 0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light = 0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark = 0x7f020040; public static final int abc_spinner_ab_focused_holo_light = 0x7f020041; public static final int abc_spinner_ab_holo_dark = 0x7f020042; public static final int abc_spinner_ab_holo_light = 0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark = 0x7f020044; public static final int abc_spinner_ab_pressed_holo_light = 0x7f020045; public static final int abc_tab_indicator_ab_holo = 0x7f020046; public static final int abc_tab_selected_focused_holo = 0x7f020047; public static final int abc_tab_selected_holo = 0x7f020048; public static final int abc_tab_selected_pressed_holo = 0x7f020049; public static final int abc_tab_unselected_pressed_holo = 0x7f02004a; public static final int abc_textfield_search_default_holo_dark = 0x7f02004b; public static final int abc_textfield_search_default_holo_light = 0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark = 0x7f02004d; public static final int abc_textfield_search_right_default_holo_light = 0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark = 0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light = 0x7f020050; public static final int abc_textfield_search_selected_holo_dark = 0x7f020051; public static final int abc_textfield_search_selected_holo_light = 0x7f020052; public static final int abc_textfield_searchview_holo_dark = 0x7f020053; public static final int abc_textfield_searchview_holo_light = 0x7f020054; public static final int abc_textfield_searchview_right_holo_dark = 0x7f020055; public static final int abc_textfield_searchview_right_holo_light = 0x7f020056; public static final int mr_ic_audio_vol = 0x7f020058; public static final int mr_ic_media_route_connecting_holo_dark = 0x7f020059; public static final int mr_ic_media_route_connecting_holo_light = 0x7f02005a; public static final int mr_ic_media_route_disabled_holo_dark = 0x7f02005b; public static final int mr_ic_media_route_disabled_holo_light = 0x7f02005c; public static final int mr_ic_media_route_holo_dark = 0x7f02005d; public static final int mr_ic_media_route_holo_light = 0x7f02005e; public static final int mr_ic_media_route_off_holo_dark = 0x7f02005f; public static final int mr_ic_media_route_off_holo_light = 0x7f020060; public static final int mr_ic_media_route_on_0_holo_dark = 0x7f020061; public static final int mr_ic_media_route_on_0_holo_light = 0x7f020062; public static final int mr_ic_media_route_on_1_holo_dark = 0x7f020063; public static final int mr_ic_media_route_on_1_holo_light = 0x7f020064; public static final int mr_ic_media_route_on_2_holo_dark = 0x7f020065; public static final int mr_ic_media_route_on_2_holo_light = 0x7f020066; public static final int mr_ic_media_route_on_holo_dark = 0x7f020067; public static final int mr_ic_media_route_on_holo_light = 0x7f020068; } public static final class id { public static final int action_bar = 0x7f05001a; public static final int action_bar_activity_content = 0x7f050015; public static final int action_bar_container = 0x7f050019; public static final int action_bar_overlay_layout = 0x7f05001d; public static final int action_bar_root = 0x7f050018; public static final int action_bar_subtitle = 0x7f050021; public static final int action_bar_title = 0x7f050020; public static final int action_context_bar = 0x7f05001b; public static final int action_menu_divider = 0x7f050016; public static final int action_menu_presenter = 0x7f050017; public static final int action_mode_bar = 0x7f05002f; public static final int action_mode_bar_stub = 0x7f05002e; public static final int action_mode_close_button = 0x7f050022; public static final int activity_chooser_view_content = 0x7f050023; public static final int always = 0x7f05000b; public static final int beginning = 0x7f050011; public static final int checkbox = 0x7f05002b; public static final int collapseActionView = 0x7f05000d; public static final int default_activity_button = 0x7f050026; public static final int dialog = 0x7f05000e; public static final int disableHome = 0x7f050008; public static final int dropdown = 0x7f05000f; public static final int edit_query = 0x7f050036; public static final int end = 0x7f050013; public static final int expand_activities_button = 0x7f050024; public static final int expanded_menu = 0x7f05002a; public static final int home = 0x7f050014; public static final int homeAsUp = 0x7f050005; public static final int icon = 0x7f050028; public static final int ifRoom = 0x7f05000a; public static final int image = 0x7f050025; public static final int left_icon = 0x7f050031; public static final int listMode = 0x7f050001; public static final int list_item = 0x7f050027; public static final int media_route_control_frame = 0x7f05004b; public static final int media_route_disconnect_button = 0x7f05004c; public static final int media_route_list = 0x7f050048; public static final int media_route_volume_layout = 0x7f050049; public static final int media_route_volume_slider = 0x7f05004a; public static final int middle = 0x7f050012; public static final int never = 0x7f050009; public static final int none = 0x7f050010; public static final int normal = 0x7f050000; public static final int progress_circular = 0x7f050034; public static final int progress_horizontal = 0x7f050035; public static final int radio = 0x7f05002d; public static final int right_container = 0x7f050032; public static final int right_icon = 0x7f050033; public static final int search_badge = 0x7f050038; public static final int search_bar = 0x7f050037; public static final int search_button = 0x7f050039; public static final int search_close_btn = 0x7f05003e; public static final int search_edit_frame = 0x7f05003a; public static final int search_go_btn = 0x7f050040; public static final int search_mag_icon = 0x7f05003b; public static final int search_plate = 0x7f05003c; public static final int search_src_text = 0x7f05003d; public static final int search_voice_btn = 0x7f050041; public static final int shortcut = 0x7f05002c; public static final int showCustom = 0x7f050007; public static final int showHome = 0x7f050004; public static final int showTitle = 0x7f050006; public static final int split_action_bar = 0x7f05001c; public static final int submit_area = 0x7f05003f; public static final int tabMode = 0x7f050002; public static final int title = 0x7f050029; public static final int title_container = 0x7f050030; public static final int top_action_bar = 0x7f05001e; public static final int up = 0x7f05001f; public static final int useLogo = 0x7f050003; public static final int withText = 0x7f05000c; } public static final class integer { public static final int abc_max_action_buttons = 0x7f090000; } public static final class layout { public static final int abc_action_bar_decor = 0x7f030000; public static final int abc_action_bar_decor_include = 0x7f030001; public static final int abc_action_bar_decor_overlay = 0x7f030002; public static final int abc_action_bar_home = 0x7f030003; public static final int abc_action_bar_tab = 0x7f030004; public static final int abc_action_bar_tabbar = 0x7f030005; public static final int abc_action_bar_title_item = 0x7f030006; public static final int abc_action_bar_view_list_nav_layout = 0x7f030007; public static final int abc_action_menu_item_layout = 0x7f030008; public static final int abc_action_menu_layout = 0x7f030009; public static final int abc_action_mode_bar = 0x7f03000a; public static final int abc_action_mode_close_item = 0x7f03000b; public static final int abc_activity_chooser_view = 0x7f03000c; public static final int abc_activity_chooser_view_include = 0x7f03000d; public static final int abc_activity_chooser_view_list_item = 0x7f03000e; public static final int abc_expanded_menu_layout = 0x7f03000f; public static final int abc_list_menu_item_checkbox = 0x7f030010; public static final int abc_list_menu_item_icon = 0x7f030011; public static final int abc_list_menu_item_layout = 0x7f030012; public static final int abc_list_menu_item_radio = 0x7f030013; public static final int abc_popup_menu_item_layout = 0x7f030014; public static final int abc_screen = 0x7f030015; public static final int abc_search_dropdown_item_icons_2line = 0x7f030016; public static final int abc_search_view = 0x7f030017; public static final int mr_media_route_chooser_dialog = 0x7f030019; public static final int mr_media_route_controller_dialog = 0x7f03001a; public static final int mr_media_route_list_item = 0x7f03001b; public static final int support_simple_spinner_dropdown_item = 0x7f03001c; } public static final class string { public static final int abc_action_bar_home_description = 0x7f0a0001; public static final int abc_action_bar_up_description = 0x7f0a0002; public static final int abc_action_menu_overflow_description = 0x7f0a0003; public static final int abc_action_mode_done = 0x7f0a0000; public static final int abc_activity_chooser_view_see_all = 0x7f0a000a; public static final int abc_activitychooserview_choose_application = 0x7f0a0009; public static final int abc_searchview_description_clear = 0x7f0a0006; public static final int abc_searchview_description_query = 0x7f0a0005; public static final int abc_searchview_description_search = 0x7f0a0004; public static final int abc_searchview_description_submit = 0x7f0a0007; public static final int abc_searchview_description_voice = 0x7f0a0008; public static final int abc_shareactionprovider_share_with = 0x7f0a000c; public static final int abc_shareactionprovider_share_with_application = 0x7f0a000b; public static final int mr_media_route_button_content_description = 0x7f0a000f; public static final int mr_media_route_chooser_searching = 0x7f0a0011; public static final int mr_media_route_chooser_title = 0x7f0a0010; public static final int mr_media_route_controller_disconnect = 0x7f0a0012; public static final int mr_system_route_name = 0x7f0a000d; public static final int mr_user_route_category_name = 0x7f0a000e; } public static final class style { public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog = 0x7f0b0061; public static final int TextAppearance_AppCompat_Base_SearchResult = 0x7f0b0069; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle = 0x7f0b006b; public static final int TextAppearance_AppCompat_Base_SearchResult_Title = 0x7f0b006a; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large = 0x7f0b0065; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small = 0x7f0b0066; public static final int TextAppearance_AppCompat_Light_Base_SearchResult = 0x7f0b006c; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle = 0x7f0b006e; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title = 0x7f0b006d; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large = 0x7f0b0067; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small = 0x7f0b0068; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0b0033; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0b0032; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b002e; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b002f; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b0031; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0b0030; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b001a; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b0006; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b0008; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b0005; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b0007; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b001e; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0b0020; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b001d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0b001f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu = 0x7f0b0052; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle = 0x7f0b0054; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse = 0x7f0b0056; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title = 0x7f0b0053; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse = 0x7f0b0055; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle = 0x7f0b004f; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse = 0x7f0b0051; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title = 0x7f0b004e; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse = 0x7f0b0050; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem = 0x7f0b005f; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b0021; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b002c; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b002d; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item = 0x7f0b0060; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b0028; public static final int Theme_AppCompat = 0x7f0b0073; public static final int Theme_AppCompat_Base_CompactMenu = 0x7f0b007d; public static final int Theme_AppCompat_Base_CompactMenu_Dialog = 0x7f0b007e; public static final int Theme_AppCompat_CompactMenu = 0x7f0b0076; public static final int Theme_AppCompat_CompactMenu_Dialog = 0x7f0b0077; public static final int Theme_AppCompat_Light = 0x7f0b0074; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0b0075; public static final int Theme_Base = 0x7f0b0078; public static final int Theme_Base_AppCompat = 0x7f0b007a; public static final int Theme_Base_AppCompat_Light = 0x7f0b007b; public static final int Theme_Base_AppCompat_Light_DarkActionBar = 0x7f0b007c; public static final int Theme_Base_Light = 0x7f0b0079; public static final int Theme_MediaRouter = 0x7f0b0081; public static final int Theme_MediaRouter_Light = 0x7f0b0082; public static final int Widget_AppCompat_ActionBar = 0x7f0b0000; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0b0002; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0b0011; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0b0017; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0b0014; public static final int Widget_AppCompat_ActionButton = 0x7f0b000b; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0b000d; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0b000f; public static final int Widget_AppCompat_ActionMode = 0x7f0b001b; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0b0036; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0b0034; public static final int Widget_AppCompat_Base_ActionBar = 0x7f0b0038; public static final int Widget_AppCompat_Base_ActionBar_Solid = 0x7f0b003a; public static final int Widget_AppCompat_Base_ActionBar_TabBar = 0x7f0b0043; public static final int Widget_AppCompat_Base_ActionBar_TabText = 0x7f0b0049; public static final int Widget_AppCompat_Base_ActionBar_TabView = 0x7f0b0046; public static final int Widget_AppCompat_Base_ActionButton = 0x7f0b003d; public static final int Widget_AppCompat_Base_ActionButton_CloseMode = 0x7f0b003f; public static final int Widget_AppCompat_Base_ActionButton_Overflow = 0x7f0b0041; public static final int Widget_AppCompat_Base_ActionMode = 0x7f0b004c; public static final int Widget_AppCompat_Base_ActivityChooserView = 0x7f0b0071; public static final int Widget_AppCompat_Base_AutoCompleteTextView = 0x7f0b006f; public static final int Widget_AppCompat_Base_DropDownItem_Spinner = 0x7f0b005b; public static final int Widget_AppCompat_Base_ListView_DropDown = 0x7f0b005d; public static final int Widget_AppCompat_Base_ListView_Menu = 0x7f0b0062; public static final int Widget_AppCompat_Base_PopupMenu = 0x7f0b0063; public static final int Widget_AppCompat_Base_ProgressBar = 0x7f0b0058; public static final int Widget_AppCompat_Base_ProgressBar_Horizontal = 0x7f0b0057; public static final int Widget_AppCompat_Base_Spinner = 0x7f0b0059; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0024; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0b0001; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b0003; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0b0004; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b0012; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0b0013; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b0018; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b0019; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0015; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0b0016; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0b000c; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0b000e; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0b0010; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0b001c; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0b0037; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0b0035; public static final int Widget_AppCompat_Light_Base_ActionBar = 0x7f0b0039; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid = 0x7f0b003b; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse = 0x7f0b003c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar = 0x7f0b0044; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse = 0x7f0b0045; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText = 0x7f0b004a; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse = 0x7f0b004b; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView = 0x7f0b0047; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse = 0x7f0b0048; public static final int Widget_AppCompat_Light_Base_ActionButton = 0x7f0b003e; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode = 0x7f0b0040; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow = 0x7f0b0042; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse = 0x7f0b004d; public static final int Widget_AppCompat_Light_Base_ActivityChooserView = 0x7f0b0072; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView = 0x7f0b0070; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner = 0x7f0b005c; public static final int Widget_AppCompat_Light_Base_ListView_DropDown = 0x7f0b005e; public static final int Widget_AppCompat_Light_Base_PopupMenu = 0x7f0b0064; public static final int Widget_AppCompat_Light_Base_Spinner = 0x7f0b005a; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0b0025; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0b0027; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0b002a; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0b0023; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0b0026; public static final int Widget_AppCompat_ListView_Menu = 0x7f0b002b; public static final int Widget_AppCompat_PopupMenu = 0x7f0b0029; public static final int Widget_AppCompat_ProgressBar = 0x7f0b000a; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0009; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0b0022; public static final int Widget_MediaRouter_Light_MediaRouteButton = 0x7f0b0080; public static final int Widget_MediaRouter_MediaRouteButton = 0x7f0b007f; } public static final class styleable { public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; public static final int[] ActionBarLayout = { 0x010100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; public static final int ActionBarWindow_windowActionBar = 0; public static final int ActionBarWindow_windowActionBarOverlay = 1; public static final int ActionBarWindow_windowSplitActionBar = 2; public static final int ActionBar_background = 10; public static final int ActionBar_backgroundSplit = 12; public static final int ActionBar_backgroundStacked = 11; public static final int ActionBar_customNavigationLayout = 13; public static final int ActionBar_displayOptions = 3; public static final int ActionBar_divider = 9; public static final int ActionBar_height = 1; public static final int ActionBar_homeLayout = 14; public static final int ActionBar_icon = 7; public static final int ActionBar_indeterminateProgressStyle = 16; public static final int ActionBar_itemPadding = 18; public static final int ActionBar_logo = 8; public static final int ActionBar_navigationMode = 2; public static final int ActionBar_progressBarPadding = 17; public static final int ActionBar_progressBarStyle = 15; public static final int ActionBar_subtitle = 4; public static final int ActionBar_subtitleTextStyle = 6; public static final int ActionBar_title = 0; public static final int ActionBar_titleTextStyle = 5; public static final int[] ActionMenuItemView = { 0x0101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; public static final int ActionMode_background = 3; public static final int ActionMode_backgroundSplit = 4; public static final int ActionMode_height = 0; public static final int ActionMode_subtitleTextStyle = 2; public static final int ActionMode_titleTextStyle = 1; public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; public static final int ActivityChooserView_initialActivityCount = 0; public static final int[] CompatTextView = { 0x7f010069 }; public static final int CompatTextView_textAllCaps = 0; public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; public static final int LinearLayoutICS_divider = 0; public static final int LinearLayoutICS_dividerPadding = 2; public static final int LinearLayoutICS_showDividers = 1; public static final int[] MediaRouteButton = { 0x0101013f, 0x01010140, 0x7f01006a }; public static final int MediaRouteButton_android_minHeight = 1; public static final int MediaRouteButton_android_minWidth = 0; public static final int MediaRouteButton_externalRouteEnabledDrawable = 2; public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; public static final int MenuGroup_android_checkableBehavior = 5; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_visible = 2; public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; public static final int MenuItem_actionLayout = 14; public static final int MenuItem_actionProviderClass = 16; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_visible = 4; public static final int MenuItem_showAsAction = 13; public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101041a }; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_preserveIconSpacing = 7; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_windowAnimationStyle = 0; public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; public static final int SearchView_android_imeOptions = 2; public static final int SearchView_android_inputType = 1; public static final int SearchView_android_maxWidth = 0; public static final int SearchView_iconifiedByDefault = 3; public static final int SearchView_queryHint = 4; public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; public static final int Spinner_android_dropDownHorizontalOffset = 4; public static final int Spinner_android_dropDownSelector = 1; public static final int Spinner_android_dropDownVerticalOffset = 5; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_android_gravity = 0; public static final int Spinner_android_popupBackground = 2; public static final int Spinner_disableChildrenWhenDisabled = 9; public static final int Spinner_popupPromptView = 8; public static final int Spinner_prompt = 6; public static final int Spinner_spinnerMode = 7; public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; public static final int Theme_actionDropDownStyle = 0; public static final int Theme_dropdownListPreferredItemHeight = 1; public static final int Theme_listChoiceBackgroundIndicator = 5; public static final int Theme_panelMenuListTheme = 4; public static final int Theme_panelMenuListWidth = 3; public static final int Theme_popupMenuStyle = 2; public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; public static final int View_android_focusable = 0; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 1; } }
42,642
65.422118
271
java
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/chromecast/sender-android/AndroidDashSender/gen/net/digitalprimates/androiddashsender/R.java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package net.digitalprimates.androiddashsender; public final class R { public static final class anim { public static final int abc_fade_in=0x7f040000; public static final int abc_fade_out=0x7f040001; public static final int abc_slide_in_bottom=0x7f040002; public static final int abc_slide_in_top=0x7f040003; public static final int abc_slide_out_bottom=0x7f040004; public static final int abc_slide_out_top=0x7f040005; } public static final class attr { /** Custom divider drawable to use for elements in the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarDivider=0x7f01000b; /** Custom item state list drawable background for action bar items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarItemBackground=0x7f01000c; /** Size of the Action Bar, including the contextual bar used to present Action Modes. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionBarSize=0x7f01000a; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarSplitStyle=0x7f010008; /** Reference to a style for the Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarStyle=0x7f010007; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabBarStyle=0x7f010004; /** Default style for tabs within an action bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabTextStyle=0x7f010005; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarWidgetTheme=0x7f010009; /** Default action button style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionButtonStyle=0x7f010012; /** Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionDropDownStyle=0x7f010043; /** An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionLayout=0x7f01004a; /** TextAppearance style that will be applied to text that appears within action menu items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionMenuTextAppearance=0x7f01000d; /** Color for text that appears within action menu items. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int actionMenuTextColor=0x7f01000e; /** Background drawable to use for action mode UI <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeBackground=0x7f010038; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseButtonStyle=0x7f010037; /** Drawable to use for the close action mode button <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseDrawable=0x7f01003a; /** Drawable to use for the Copy action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCopyDrawable=0x7f01003c; /** Drawable to use for the Cut action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCutDrawable=0x7f01003b; /** Drawable to use for the Find action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeFindDrawable=0x7f010040; /** Drawable to use for the Paste action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePasteDrawable=0x7f01003d; /** PopupWindow style to use for action modes when showing as a window overlay. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePopupWindowStyle=0x7f010042; /** Drawable to use for the Select all action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSelectAllDrawable=0x7f01003e; /** Drawable to use for the Share action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeShareDrawable=0x7f01003f; /** Background drawable to use for action mode UI in the lower split bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSplitBackground=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeStyle=0x7f010036; /** Drawable to use for the Web Search action button in WebView selection action modes <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeWebSearchDrawable=0x7f010041; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionOverflowButtonStyle=0x7f010006; /** The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionProviderClass=0x7f01004c; /** The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionViewClass=0x7f01004b; /** Default ActivityChooserView style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int activityChooserViewStyle=0x7f010068; /** Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int background=0x7f01002b; /** Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundSplit=0x7f01002d; /** Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundStacked=0x7f01002c; /** A style that may be applied to Buttons placed within a LinearLayout with the style buttonBarStyle to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarButtonStyle=0x7f010014; /** A style that may be applied to horizontal LinearLayouts to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarStyle=0x7f010013; /** Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int customNavigationLayout=0x7f01002e; /** Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int disableChildrenWhenDisabled=0x7f010050; /** Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static final int displayOptions=0x7f010024; /** Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int divider=0x7f01002a; /** A drawable that may be used as a horizontal divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerHorizontal=0x7f010017; /** Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dividerPadding=0x7f010052; /** A drawable that may be used as a vertical divider between visual elements. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerVertical=0x7f010016; /** ListPopupWindow comaptibility <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dropDownListViewStyle=0x7f01001d; /** The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dropdownListPreferredItemHeight=0x7f010044; /** The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandActivityOverflowButtonDrawable=0x7f010067; /** This drawable is a state list where the "checked" state indicates active media routing. Checkable indicates connecting and non-checked / non-checkable indicates that media is playing to the local device only. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int externalRouteEnabledDrawable=0x7f01006a; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int height=0x7f010022; /** Specifies a drawable to use for the 'home as up' indicator. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeAsUpIndicator=0x7f01000f; /** Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeLayout=0x7f01002f; /** Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int icon=0x7f010028; /** The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int iconifiedByDefault=0x7f010056; /** Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int indeterminateProgressStyle=0x7f010031; /** The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int initialActivityCount=0x7f010066; /** Specifies whether the theme is light, otherwise it is dark. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int isLightTheme=0x7f010055; /** Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemPadding=0x7f010033; /** Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listChoiceBackgroundIndicator=0x7f010048; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listPopupWindowStyle=0x7f01001e; /** The preferred list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeight=0x7f010018; /** A larger, more robust list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightLarge=0x7f01001a; /** A smaller, sleeker list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightSmall=0x7f010019; /** The preferred padding along the left edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingLeft=0x7f01001b; /** The preferred padding along the right edge of list items. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingRight=0x7f01001c; /** Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int logo=0x7f010029; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int mediaRouteButtonStyle=0x7f01006b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int mediaRouteConnectingDrawable=0x7f01006d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int mediaRouteOffDrawable=0x7f01006c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int mediaRouteOnDrawable=0x7f01006e; /** The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> */ public static final int navigationMode=0x7f010023; /** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingEnd=0x7f010035; /** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingStart=0x7f010034; /** Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelMenuListTheme=0x7f010047; /** Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int panelMenuListWidth=0x7f010046; /** Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupMenuStyle=0x7f010045; /** Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupPromptView=0x7f01004f; /** Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int progressBarPadding=0x7f010032; /** Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int progressBarStyle=0x7f010030; /** The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int prompt=0x7f01004d; /** An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int queryHint=0x7f010057; /** SearchView dropdown background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchDropdownBackground=0x7f010058; /** The list item height for search results. @hide <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int searchResultListItemHeight=0x7f010061; /** SearchView AutoCompleteTextView style <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewAutoCompleteTextView=0x7f010065; /** SearchView close button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewCloseIcon=0x7f010059; /** SearchView query refinement icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQuery=0x7f01005d; /** SearchView query refinement icon background <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQueryBackground=0x7f01005e; /** SearchView Go button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewGoIcon=0x7f01005a; /** SearchView Search icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewSearchIcon=0x7f01005b; /** SearchView text field background for the left section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextField=0x7f01005f; /** SearchView text field background for the right section <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextFieldRight=0x7f010060; /** SearchView Voice button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewVoiceIcon=0x7f01005c; /** A style that may be applied to buttons or other selectable items that should react to pressed and focus states, but that do not have a clear visual border along the edges. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int selectableItemBackground=0x7f010015; /** How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> */ public static final int showAsAction=0x7f010049; /** Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static final int showDividers=0x7f010051; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerDropDownItemStyle=0x7f010054; /** Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> */ public static final int spinnerMode=0x7f01004e; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerStyle=0x7f010053; /** Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitle=0x7f010025; /** Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextStyle=0x7f010027; /** Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static final int textAllCaps=0x7f010069; /** Text color, typeface, size, and style for the text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceLargePopupMenu=0x7f010010; /** The preferred TextAppearance for the primary text of list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItem=0x7f01001f; /** The preferred TextAppearance for the primary text of small list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItemSmall=0x7f010020; /** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultSubtitle=0x7f010063; /** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultTitle=0x7f010062; /** Text color, typeface, size, and style for small text inside of a popup menu. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSmallPopupMenu=0x7f010011; /** Text color for urls in search suggestions, used by things like global search <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int textColorSearchUrl=0x7f010064; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int title=0x7f010021; /** Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextStyle=0x7f010026; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBar=0x7f010000; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBarOverlay=0x7f010001; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowSplitActionBar=0x7f010002; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb=0x7f060000; public static final int abc_action_bar_expanded_action_views_exclusive=0x7f060001; /** Whether action menu items should be displayed in ALLCAPS or not. Defaults to true. If this is not appropriate for specific locales it should be disabled in that locale's resources. */ public static final int abc_config_actionMenuItemAllCaps=0x7f060005; /** Whether action menu items should obey the "withText" showAsAction flag. This may be set to false for situations where space is extremely limited. Whether action menu items should obey the "withText" showAsAction. This may be set to false for situations where space is extremely limited. */ public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f060004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003; public static final int abc_split_action_bar_is_narrow=0x7f060002; } public static final class color { public static final int abc_search_url_text_holo=0x7f070009; public static final int abc_search_url_text_normal=0x7f070000; public static final int abc_search_url_text_pressed=0x7f070002; public static final int abc_search_url_text_selected=0x7f070001; public static final int background=0x7f070003; public static final int background2=0x7f070004; public static final int black=0x7f070008; public static final int green=0x7f070006; public static final int red=0x7f070005; public static final int white=0x7f070007; } public static final class dimen { /** Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. */ public static final int abc_action_bar_default_height=0x7f080002; /** Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. */ public static final int abc_action_bar_icon_vertical_padding=0x7f080003; /** Maximum height for a stacked tab bar as part of an action bar */ public static final int abc_action_bar_stacked_max_height=0x7f080009; /** Maximum width for a stacked action bar tab. This prevents action bar tabs from becoming too wide on a wide screen when only a few are present. */ public static final int abc_action_bar_stacked_tab_max_width=0x7f080001; /** Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles */ public static final int abc_action_bar_subtitle_bottom_margin=0x7f080007; /** Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles */ public static final int abc_action_bar_subtitle_text_size=0x7f080005; /** Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles */ public static final int abc_action_bar_subtitle_top_margin=0x7f080006; /** Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles */ public static final int abc_action_bar_title_text_size=0x7f080004; /** Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar */ public static final int abc_action_button_min_width=0x7f080008; /** The maximum width we would prefer dialogs to be. 0 if there is no maximum (let them grow as large as the screen). Actual values are specified for -large and -xlarge configurations. see comment in values/config.xml see comment in values/config.xml */ public static final int abc_config_prefDialogWidth=0x7f080000; /** Width of the icon in a dropdown list */ public static final int abc_dropdownitem_icon_width=0x7f08000f; /** Text padding for dropdown items */ public static final int abc_dropdownitem_text_padding_left=0x7f08000d; public static final int abc_dropdownitem_text_padding_right=0x7f08000e; public static final int abc_panel_menu_list_width=0x7f08000a; /** Preferred width of the search view. */ public static final int abc_search_view_preferred_width=0x7f08000c; /** Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. */ public static final int abc_search_view_text_min_width=0x7f08000b; /** Default screen margins, per the Android Design guidelines. Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. */ public static final int activity_horizontal_margin=0x7f080010; public static final int activity_vertical_margin=0x7f080011; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo=0x7f020000; public static final int abc_ab_bottom_solid_light_holo=0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static final int abc_ab_bottom_transparent_light_holo=0x7f020003; public static final int abc_ab_share_pack_holo_dark=0x7f020004; public static final int abc_ab_share_pack_holo_light=0x7f020005; public static final int abc_ab_solid_dark_holo=0x7f020006; public static final int abc_ab_solid_light_holo=0x7f020007; public static final int abc_ab_stacked_solid_dark_holo=0x7f020008; public static final int abc_ab_stacked_solid_light_holo=0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static final int abc_ab_transparent_dark_holo=0x7f02000c; public static final int abc_ab_transparent_light_holo=0x7f02000d; public static final int abc_cab_background_bottom_holo_dark=0x7f02000e; public static final int abc_cab_background_bottom_holo_light=0x7f02000f; public static final int abc_cab_background_top_holo_dark=0x7f020010; public static final int abc_cab_background_top_holo_light=0x7f020011; public static final int abc_ic_ab_back_holo_dark=0x7f020012; public static final int abc_ic_ab_back_holo_light=0x7f020013; public static final int abc_ic_cab_done_holo_dark=0x7f020014; public static final int abc_ic_cab_done_holo_light=0x7f020015; public static final int abc_ic_clear=0x7f020016; public static final int abc_ic_clear_disabled=0x7f020017; public static final int abc_ic_clear_holo_light=0x7f020018; public static final int abc_ic_clear_normal=0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static final int abc_ic_clear_search_api_holo_light=0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static final int abc_ic_commit_search_api_holo_light=0x7f02001d; public static final int abc_ic_go=0x7f02001e; public static final int abc_ic_go_search_api_holo_light=0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static final int abc_ic_menu_share_holo_dark=0x7f020022; public static final int abc_ic_menu_share_holo_light=0x7f020023; public static final int abc_ic_search=0x7f020024; public static final int abc_ic_search_api_holo_light=0x7f020025; public static final int abc_ic_voice_search=0x7f020026; public static final int abc_ic_voice_search_api_holo_light=0x7f020027; public static final int abc_item_background_holo_dark=0x7f020028; public static final int abc_item_background_holo_light=0x7f020029; public static final int abc_list_divider_holo_dark=0x7f02002a; public static final int abc_list_divider_holo_light=0x7f02002b; public static final int abc_list_focused_holo=0x7f02002c; public static final int abc_list_longpressed_holo=0x7f02002d; public static final int abc_list_pressed_holo_dark=0x7f02002e; public static final int abc_list_pressed_holo_light=0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark=0x7f020030; public static final int abc_list_selector_background_transition_holo_light=0x7f020031; public static final int abc_list_selector_disabled_holo_dark=0x7f020032; public static final int abc_list_selector_disabled_holo_light=0x7f020033; public static final int abc_list_selector_holo_dark=0x7f020034; public static final int abc_list_selector_holo_light=0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static final int abc_menu_dropdown_panel_holo_light=0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static final int abc_menu_hardkey_panel_holo_light=0x7f020039; public static final int abc_search_dropdown_dark=0x7f02003a; public static final int abc_search_dropdown_light=0x7f02003b; public static final int abc_spinner_ab_default_holo_dark=0x7f02003c; public static final int abc_spinner_ab_default_holo_light=0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark=0x7f020040; public static final int abc_spinner_ab_focused_holo_light=0x7f020041; public static final int abc_spinner_ab_holo_dark=0x7f020042; public static final int abc_spinner_ab_holo_light=0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static final int abc_spinner_ab_pressed_holo_light=0x7f020045; public static final int abc_tab_indicator_ab_holo=0x7f020046; public static final int abc_tab_selected_focused_holo=0x7f020047; public static final int abc_tab_selected_holo=0x7f020048; public static final int abc_tab_selected_pressed_holo=0x7f020049; public static final int abc_tab_unselected_pressed_holo=0x7f02004a; public static final int abc_textfield_search_default_holo_dark=0x7f02004b; public static final int abc_textfield_search_default_holo_light=0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static final int abc_textfield_search_right_default_holo_light=0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light=0x7f020050; public static final int abc_textfield_search_selected_holo_dark=0x7f020051; public static final int abc_textfield_search_selected_holo_light=0x7f020052; public static final int abc_textfield_searchview_holo_dark=0x7f020053; public static final int abc_textfield_searchview_holo_light=0x7f020054; public static final int abc_textfield_searchview_right_holo_dark=0x7f020055; public static final int abc_textfield_searchview_right_holo_light=0x7f020056; public static final int ic_launcher=0x7f020057; public static final int mr_ic_audio_vol=0x7f020058; public static final int mr_ic_media_route_connecting_holo_dark=0x7f020059; public static final int mr_ic_media_route_connecting_holo_light=0x7f02005a; public static final int mr_ic_media_route_disabled_holo_dark=0x7f02005b; public static final int mr_ic_media_route_disabled_holo_light=0x7f02005c; public static final int mr_ic_media_route_holo_dark=0x7f02005d; public static final int mr_ic_media_route_holo_light=0x7f02005e; public static final int mr_ic_media_route_off_holo_dark=0x7f02005f; public static final int mr_ic_media_route_off_holo_light=0x7f020060; public static final int mr_ic_media_route_on_0_holo_dark=0x7f020061; public static final int mr_ic_media_route_on_0_holo_light=0x7f020062; public static final int mr_ic_media_route_on_1_holo_dark=0x7f020063; public static final int mr_ic_media_route_on_1_holo_light=0x7f020064; public static final int mr_ic_media_route_on_2_holo_dark=0x7f020065; public static final int mr_ic_media_route_on_2_holo_light=0x7f020066; public static final int mr_ic_media_route_on_holo_dark=0x7f020067; public static final int mr_ic_media_route_on_holo_light=0x7f020068; public static final int muted_button=0x7f020069; public static final int pause_button=0x7f02006a; public static final int play_button=0x7f02006b; public static final int unmuted_button=0x7f02006c; } public static final class id { public static final int action_bar=0x7f05001a; public static final int action_bar_activity_content=0x7f050015; public static final int action_bar_container=0x7f050019; public static final int action_bar_overlay_layout=0x7f05001d; public static final int action_bar_root=0x7f050018; public static final int action_bar_subtitle=0x7f050021; public static final int action_bar_title=0x7f050020; public static final int action_context_bar=0x7f05001b; public static final int action_menu_divider=0x7f050016; public static final int action_menu_presenter=0x7f050017; public static final int action_mode_bar=0x7f05002f; public static final int action_mode_bar_stub=0x7f05002e; public static final int action_mode_close_button=0x7f050022; public static final int activity_chooser_view_content=0x7f050023; public static final int always=0x7f05000b; public static final int beginning=0x7f050011; public static final int checkbox=0x7f05002b; public static final int collapseActionView=0x7f05000d; public static final int default_activity_button=0x7f050026; public static final int dialog=0x7f05000e; public static final int disableHome=0x7f050008; public static final int dropdown=0x7f05000f; public static final int edit_query=0x7f050036; public static final int end=0x7f050013; public static final int expand_activities_button=0x7f050024; public static final int expanded_menu=0x7f05002a; public static final int home=0x7f050014; public static final int homeAsUp=0x7f050005; public static final int icon=0x7f050028; public static final int ifRoom=0x7f05000a; public static final int image=0x7f050025; public static final int left_icon=0x7f050031; public static final int listMode=0x7f050001; public static final int list_item=0x7f050027; public static final int media_route_button=0x7f050043; public static final int media_route_control_frame=0x7f05004b; public static final int media_route_disconnect_button=0x7f05004c; public static final int media_route_list=0x7f050048; public static final int media_route_volume_layout=0x7f050049; public static final int media_route_volume_slider=0x7f05004a; public static final int middle=0x7f050012; public static final int never=0x7f050009; public static final int none=0x7f050010; public static final int normal=0x7f050000; public static final int play_pause_toggle=0x7f050044; public static final int progress_circular=0x7f050034; public static final int progress_horizontal=0x7f050035; public static final int radio=0x7f05002d; public static final int right_container=0x7f050032; public static final int right_icon=0x7f050033; public static final int scrub_bar=0x7f050047; public static final int search_badge=0x7f050038; public static final int search_bar=0x7f050037; public static final int search_button=0x7f050039; public static final int search_close_btn=0x7f05003e; public static final int search_edit_frame=0x7f05003a; public static final int search_go_btn=0x7f050040; public static final int search_mag_icon=0x7f05003b; public static final int search_plate=0x7f05003c; public static final int search_src_text=0x7f05003d; public static final int search_voice_btn=0x7f050041; public static final int shortcut=0x7f05002c; public static final int showCustom=0x7f050007; public static final int showHome=0x7f050004; public static final int showTitle=0x7f050006; public static final int sound_toggle=0x7f050045; public static final int split_action_bar=0x7f05001c; public static final int streamOptions=0x7f050042; public static final int submit_area=0x7f05003f; public static final int tabMode=0x7f050002; public static final int title=0x7f050029; public static final int title_container=0x7f050030; public static final int top_action_bar=0x7f05001e; public static final int up=0x7f05001f; public static final int useLogo=0x7f050003; public static final int volume_bar=0x7f050046; public static final int withText=0x7f05000c; } public static final class integer { /** The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. */ public static final int abc_max_action_buttons=0x7f090000; } public static final class layout { public static final int abc_action_bar_decor=0x7f030000; public static final int abc_action_bar_decor_include=0x7f030001; public static final int abc_action_bar_decor_overlay=0x7f030002; public static final int abc_action_bar_home=0x7f030003; public static final int abc_action_bar_tab=0x7f030004; public static final int abc_action_bar_tabbar=0x7f030005; public static final int abc_action_bar_title_item=0x7f030006; public static final int abc_action_bar_view_list_nav_layout=0x7f030007; public static final int abc_action_menu_item_layout=0x7f030008; public static final int abc_action_menu_layout=0x7f030009; public static final int abc_action_mode_bar=0x7f03000a; public static final int abc_action_mode_close_item=0x7f03000b; public static final int abc_activity_chooser_view=0x7f03000c; public static final int abc_activity_chooser_view_include=0x7f03000d; public static final int abc_activity_chooser_view_list_item=0x7f03000e; public static final int abc_expanded_menu_layout=0x7f03000f; public static final int abc_list_menu_item_checkbox=0x7f030010; public static final int abc_list_menu_item_icon=0x7f030011; public static final int abc_list_menu_item_layout=0x7f030012; public static final int abc_list_menu_item_radio=0x7f030013; public static final int abc_popup_menu_item_layout=0x7f030014; public static final int abc_screen=0x7f030015; public static final int abc_search_dropdown_item_icons_2line=0x7f030016; public static final int abc_search_view=0x7f030017; public static final int activity_main=0x7f030018; public static final int mr_media_route_chooser_dialog=0x7f030019; public static final int mr_media_route_controller_dialog=0x7f03001a; public static final int mr_media_route_list_item=0x7f03001b; public static final int support_simple_spinner_dropdown_item=0x7f03001c; public static final int title_cast_button=0x7f03001d; } public static final class string { /** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_home_description=0x7f0a0001; /** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_up_description=0x7f0a0002; /** Content description for the action menu overflow button. [CHAR LIMIT=NONE] */ public static final int abc_action_menu_overflow_description=0x7f0a0003; /** Label for the "Done" button on the far left of action mode toolbars. */ public static final int abc_action_mode_done=0x7f0a0000; /** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] */ public static final int abc_activity_chooser_view_see_all=0x7f0a000a; /** ActivityChooserView - accessibility support Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] */ public static final int abc_activitychooserview_choose_application=0x7f0a0009; /** SearchView accessibility description for clear button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_clear=0x7f0a0006; /** SearchView accessibility description for search text field [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_query=0x7f0a0005; /** SearchView accessibility description for search button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_search=0x7f0a0004; /** SearchView accessibility description for submit button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_submit=0x7f0a0007; /** SearchView accessibility description for voice button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_voice=0x7f0a0008; /** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with=0x7f0a000c; /** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with_application=0x7f0a000b; public static final int app_name=0x7f0a0017; public static final int error_no_session=0x7f0a0016; /** Error message from Cast MediaRouteProvider that indicates that the provider got an error when sending a media command (e.g., load media, pause, etc.) to the selected Cast device. [CHAR LIMIT=NONE] */ public static final int error_ramp_command_failed=0x7f0a0015; /** Error message from Cast MediaRouteProvider that indicates that the provider has lost its connection to the selected Cast device. [CHAR LIMIT=NONE] */ public static final int error_session_ended=0x7f0a0014; /** Error message from Cast MediaRouteProvider that indicates that the provider was not able to connect to the selected Cast device. [CHAR LIMIT=NONE] */ public static final int error_start_session_failed=0x7f0a0013; /** Content description of a MediaRouteButton for accessibility support. [CHAR LIMIT=50] */ public static final int mr_media_route_button_content_description=0x7f0a000f; /** Placeholder text to show when no devices have been found. [CHAR LIMIT=50] */ public static final int mr_media_route_chooser_searching=0x7f0a0011; /** Title of the media route chooser dialog. [CHAR LIMIT=30] */ public static final int mr_media_route_chooser_title=0x7f0a0010; /** Button to disconnect from a media route. [CHAR LIMIT=30] */ public static final int mr_media_route_controller_disconnect=0x7f0a0012; /** Name for the default system route prior to Jellybean. [CHAR LIMIT=30] */ public static final int mr_system_route_name=0x7f0a000d; /** Name for the user route category created when publishing routes to the system in Jellybean and above. [CHAR LIMIT=30] */ public static final int mr_user_route_category_name=0x7f0a000e; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f0b0083; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f0b0084; /** Mimic text appearance in select_dialog_item.xml */ public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0061; public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f0b0069; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006b; /** Search View result styles */ public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006a; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0065; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b0066; public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b006c; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b006e; /** TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default versions instead (which are exactly the same). */ public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b006d; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b0067; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b0068; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0033; public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0032; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b002e; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b002f; public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0031; public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0030; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0052; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0054; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0056; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0053; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0055; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b004f; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0051; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b004e; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0050; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b005f; public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002c; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002d; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0060; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028; /** Themes in the "Theme.AppCompat" family will contain an action bar by default. If Holo themes are available on the current platform version they will be used. A limited Holo-styled action bar will be provided on platform versions older than 3.0. (API 11) These theme declarations contain any version-independent specification. Items that need to vary based on platform version should be defined in the corresponding "Theme.Base" theme. Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat=0x7f0b0073; /** Menu/item attributes */ public static final int Theme_AppCompat_Base_CompactMenu=0x7f0b007d; public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b007e; /** Menu/item attributes */ public static final int Theme_AppCompat_CompactMenu=0x7f0b0076; public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f0b0077; /** Platform-independent theme providing an action bar in a light-themed activity. */ public static final int Theme_AppCompat_Light=0x7f0b0074; /** Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat_Light_DarkActionBar=0x7f0b0075; /** Base platform-dependent theme */ public static final int Theme_Base=0x7f0b0078; /** Base platform-dependent theme providing an action bar in a dark-themed activity. Base platform-dependent theme providing an action bar in a dark-themed activity. */ public static final int Theme_Base_AppCompat=0x7f0b007a; /** Base platform-dependent theme providing an action bar in a light-themed activity. Base platform-dependent theme providing an action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light=0x7f0b007b; /** Base platform-dependent theme providing a dark action bar in a light-themed activity. Base platform-dependent theme providing a dark action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b007c; /** Base platform-dependent theme providing a light-themed activity. */ public static final int Theme_Base_Light=0x7f0b0079; public static final int Theme_MediaRouter=0x7f0b0081; public static final int Theme_MediaRouter_Light=0x7f0b0082; /** Styles in here can be extended for customisation in your application. Each utilises one of the Base styles. If Holo themes are available on the current platform version they will be used instead of the compat styles. */ public static final int Widget_AppCompat_ActionBar=0x7f0b0000; public static final int Widget_AppCompat_ActionBar_Solid=0x7f0b0002; public static final int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011; public static final int Widget_AppCompat_ActionBar_TabText=0x7f0b0017; public static final int Widget_AppCompat_ActionBar_TabView=0x7f0b0014; public static final int Widget_AppCompat_ActionButton=0x7f0b000b; public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d; public static final int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f; public static final int Widget_AppCompat_ActionMode=0x7f0b001b; public static final int Widget_AppCompat_ActivityChooserView=0x7f0b0036; public static final int Widget_AppCompat_AutoCompleteTextView=0x7f0b0034; public static final int Widget_AppCompat_Base_ActionBar=0x7f0b0038; public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003a; public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0043; public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b0049; public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0046; /** Action Button Styles */ public static final int Widget_AppCompat_Base_ActionButton=0x7f0b003d; public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b003f; public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0041; public static final int Widget_AppCompat_Base_ActionMode=0x7f0b004c; public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0071; /** AutoCompleteTextView styles (for SearchView) */ public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b006f; public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005b; /** Spinner Widgets */ public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005d; public static final int Widget_AppCompat_Base_ListView_Menu=0x7f0b0062; /** Popup Menu */ public static final int Widget_AppCompat_Base_PopupMenu=0x7f0b0063; public static final int Widget_AppCompat_Base_ProgressBar=0x7f0b0058; /** Progress Bar */ public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0057; /** Action Bar Spinner Widgets */ public static final int Widget_AppCompat_Base_Spinner=0x7f0b0059; public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024; public static final int Widget_AppCompat_Light_ActionBar=0x7f0b0001; public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004; public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013; public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019; public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016; public static final int Widget_AppCompat_Light_ActionButton=0x7f0b000c; public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e; public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010; public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c; public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0037; public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0035; public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f0b0039; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003b; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0044; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0045; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004a; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004b; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0047; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b0048; public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f0b003e; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0040; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0042; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004d; public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0072; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0070; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005c; public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b005e; public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0064; public static final int Widget_AppCompat_Light_Base_Spinner=0x7f0b005a; public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025; public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027; public static final int Widget_AppCompat_Light_PopupMenu=0x7f0b002a; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023; public static final int Widget_AppCompat_ListView_DropDown=0x7f0b0026; public static final int Widget_AppCompat_ListView_Menu=0x7f0b002b; public static final int Widget_AppCompat_PopupMenu=0x7f0b0029; public static final int Widget_AppCompat_ProgressBar=0x7f0b000a; public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022; public static final int Widget_MediaRouter_Light_MediaRouteButton=0x7f0b0080; public static final int Widget_MediaRouter_MediaRouteButton=0x7f0b007f; } public static final class styleable { /** ============================================ Attributes used to style the Action Bar. These should be set on your theme; the default actionBarStyle will propagate them to the correct elements as needed. Please Note: when overriding attributes for an ActionBar style you must specify each attribute twice: once with the "android:" namespace prefix and once without. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBar_background net.digitalprimates.androiddashsender:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit net.digitalprimates.androiddashsender:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked net.digitalprimates.androiddashsender:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout net.digitalprimates.androiddashsender:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions net.digitalprimates.androiddashsender:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_divider net.digitalprimates.androiddashsender:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_height net.digitalprimates.androiddashsender:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout net.digitalprimates.androiddashsender:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_icon net.digitalprimates.androiddashsender:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle net.digitalprimates.androiddashsender:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_itemPadding net.digitalprimates.androiddashsender:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of system-provided items in the bar.</td></tr> <tr><td><code>{@link #ActionBar_logo net.digitalprimates.androiddashsender:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode net.digitalprimates.androiddashsender:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding net.digitalprimates.androiddashsender:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle net.digitalprimates.androiddashsender:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_subtitle net.digitalprimates.androiddashsender:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle net.digitalprimates.androiddashsender:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_title net.digitalprimates.androiddashsender:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle net.digitalprimates.androiddashsender:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033 }; /** <p> @attr description Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:background */ public static final int ActionBar_background = 10; /** <p> @attr description Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p> @attr description Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p> @attr description Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p> @attr description Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p> @attr description Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:divider */ public static final int ActionBar_divider = 9; /** <p> @attr description Specifies a fixed height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:height */ public static final int ActionBar_height = 1; /** <p> @attr description Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p> @attr description Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:icon */ public static final int ActionBar_icon = 7; /** <p> @attr description Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p> @attr description Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p> @attr description Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:logo */ public static final int ActionBar_logo = 8; /** <p> @attr description The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p> @attr description Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p> @attr description Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p> @attr description Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:subtitle */ public static final int ActionBar_subtitle = 4; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p> @attr description Specifies title text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:title */ public static final int ActionBar_title = 0; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Valid LayoutParams for views placed in the action bar as custom views. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr> </table> @see #ActionBarLayout_android_layout_gravity */ public static final int[] ActionBarLayout = { 0x010100b3 }; /** <p>This symbol is the offset where the {@link android.R.attr#layout_gravity} attribute's value can be found in the {@link #ActionBarLayout} array. @attr name android:layout_gravity */ public static final int ActionBarLayout_android_layout_gravity = 0; /** These attributes are meant to be specified and customized by the app. The system will read and apply them as needed. These attributes control properties of the activity window, such as whether an action bar should be present and whether it should overlay content. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar net.digitalprimates.androiddashsender:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay net.digitalprimates.androiddashsender:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar net.digitalprimates.androiddashsender:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002 }; /** <p>This symbol is the offset where the {@link net.digitalprimates.androiddashsender.R.attr#windowActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name net.digitalprimates.androiddashsender:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link net.digitalprimates.androiddashsender.R.attr#windowActionBarOverlay} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name net.digitalprimates.androiddashsender:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p>This symbol is the offset where the {@link net.digitalprimates.androiddashsender.R.attr#windowSplitActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name net.digitalprimates.androiddashsender:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Size of padding on either end of a divider. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background net.digitalprimates.androiddashsender:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit net.digitalprimates.androiddashsender:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height net.digitalprimates.androiddashsender:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle net.digitalprimates.androiddashsender:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle net.digitalprimates.androiddashsender:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010022, 0x7f010026, 0x7f010027, 0x7f01002b, 0x7f01002d }; /** <p> @attr description Specifies a background for the action mode bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:background */ public static final int ActionMode_background = 3; /** <p> @attr description Specifies a background for the split action mode bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p> @attr description Specifies a fixed height for the action mode bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:height */ public static final int ActionMode_height = 0; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attrbitutes for a ActivityChooserView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable net.digitalprimates.androiddashsender:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount net.digitalprimates.androiddashsender:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f010066, 0x7f010067 }; /** <p> @attr description The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p> @attr description The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:initialActivityCount */ public static final int ActivityChooserView_initialActivityCount = 0; /** Attributes that can be used with a CompatTextView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #CompatTextView_textAllCaps net.digitalprimates.androiddashsender:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f010069 }; /** <p> @attr description Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:textAllCaps */ public static final int CompatTextView_textAllCaps = 0; /** Attributes that can be used with a LinearLayoutICS. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #LinearLayoutICS_divider net.digitalprimates.androiddashsender:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding net.digitalprimates.androiddashsender:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers net.digitalprimates.androiddashsender:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f01002a, 0x7f010051, 0x7f010052 }; /** <p> @attr description Drawable to use as a vertical divider between buttons. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:divider */ public static final int LinearLayoutICS_divider = 0; /** <p> @attr description Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p> @attr description Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Attributes that can be used with a MediaRouteButton. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MediaRouteButton_android_minHeight android:minHeight}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_android_minWidth android:minWidth}</code></td><td></td></tr> <tr><td><code>{@link #MediaRouteButton_externalRouteEnabledDrawable net.digitalprimates.androiddashsender:externalRouteEnabledDrawable}</code></td><td> This drawable is a state list where the "checked" state indicates active media routing.</td></tr> </table> @see #MediaRouteButton_android_minHeight @see #MediaRouteButton_android_minWidth @see #MediaRouteButton_externalRouteEnabledDrawable */ public static final int[] MediaRouteButton = { 0x0101013f, 0x01010140, 0x7f01006a }; /** <p>This symbol is the offset where the {@link android.R.attr#minHeight} attribute's value can be found in the {@link #MediaRouteButton} array. @attr name android:minHeight */ public static final int MediaRouteButton_android_minHeight = 1; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #MediaRouteButton} array. @attr name android:minWidth */ public static final int MediaRouteButton_android_minWidth = 0; /** <p> @attr description This drawable is a state list where the "checked" state indicates active media routing. Checkable indicates connecting and non-checked / non-checkable indicates that media is playing to the local device only. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:externalRouteEnabledDrawable */ public static final int MediaRouteButton_externalRouteEnabledDrawable = 2; /** Base attributes that are available to all groups. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p> @attr description Whether the items are capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkableBehavior}. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p> @attr description Whether the items are enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p> @attr description The ID of the group. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p> @attr description The category applied to all items within this group. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p> @attr description The order within the category applied to all items within this group. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p> @attr description Whether the items are shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Base attributes that are available to all Item objects. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuItem_actionLayout net.digitalprimates.androiddashsender:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass net.digitalprimates.androiddashsender:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item.</td></tr> <tr><td><code>{@link #MenuItem_actionViewClass net.digitalprimates.androiddashsender:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an action view.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be called when the item is clicked.</td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction net.digitalprimates.androiddashsender:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; /** <p> @attr description An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p> @attr description The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p> @attr description The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p> @attr description The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#alphabeticShortcut}. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p> @attr description Whether the item is capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkable}. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p> @attr description Whether the item is checked. Note that you must first have enabled checking with the checkable attribute or else the check mark will not appear. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checked}. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p> @attr description Whether the item is enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p> @attr description The icon associated with this item. This icon will not always be shown, so the title should be sufficient in describing this item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#icon}. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p> @attr description The ID of the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p> @attr description The category applied to the item. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p> @attr description The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#numericShortcut}. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p> @attr description Name of a method on the Context used to inflate the menu that will be called when the item is clicked. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#onClick}. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p> @attr description The order within the category applied to the item. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p> @attr description The title associated with the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#title}. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p> @attr description The condensed title associated with the item. This is used in situations where the normal title may be too long to be displayed. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#titleCondensed}. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p> @attr description Whether the item is shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p> @attr description How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101041a }; /** <p> @attr description Default background for the menu header. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#headerBackground}. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p> @attr description Default horizontal divider between rows of menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#horizontalDivider}. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p> @attr description Default background for each menu item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemBackground}. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p> @attr description Default disabled icon alpha for each menu item that shows an icon. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemIconDisabledAlpha}. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p> @attr description Default appearance of menu item text. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemTextAppearance}. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p> @attr description Whether space should be reserved in layout when an icon is missing. <p>This is a private symbol. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p> @attr description Default vertical divider between menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#verticalDivider}. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p> @attr description Default animations for the menu. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#windowAnimationStyle}. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault net.digitalprimates.androiddashsender:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_queryHint net.digitalprimates.androiddashsender:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057 }; /** <p> @attr description The IME options to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#imeOptions}. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p> @attr description The input type to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#inputType}. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p> @attr description An optional maximum width of the SearchView. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#maxWidth}. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p> @attr description The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p> @attr description An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled net.digitalprimates.androiddashsender:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.</td></tr> <tr><td><code>{@link #Spinner_popupPromptView net.digitalprimates.androiddashsender:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_prompt net.digitalprimates.androiddashsender:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode net.digitalprimates.androiddashsender:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; /** <p> @attr description Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownHorizontalOffset}. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p> @attr description List selector to use for spinnerMode="dropdown" display. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownSelector}. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p> @attr description Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownVerticalOffset}. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p> @attr description Width of the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownWidth}. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p> @attr description Gravity setting for positioning the currently selected item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#gravity}. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p> @attr description Background drawable to use for the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#popupBackground}. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p> @attr description Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p> @attr description Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p> @attr description The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:prompt */ public static final int Spinner_prompt = 6; /** <p> @attr description Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** These are the standard attributes that make up a complete theme. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Theme_actionDropDownStyle net.digitalprimates.androiddashsender:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight net.digitalprimates.androiddashsender:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator net.digitalprimates.androiddashsender:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme net.digitalprimates.androiddashsender:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth net.digitalprimates.androiddashsender:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle net.digitalprimates.androiddashsender:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048 }; /** <p> @attr description Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p> @attr description The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p> @attr description Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p> @attr description Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p> @attr description Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p> @attr description Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_paddingEnd net.digitalprimates.androiddashsender:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart net.digitalprimates.androiddashsender:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010034, 0x7f010035 }; /** <p> @attr description Boolean that controls whether a view can take focus. By default the user can not move focus to a view; by setting this attribute to true the view is allowed to take focus. This value does not impact the behavior of directly calling {@link android.view.View#requestFocus}, which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#focusable}. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p> @attr description Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:paddingEnd */ public static final int View_paddingEnd = 2; /** <p> @attr description Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name net.digitalprimates.androiddashsender:paddingStart */ public static final int View_paddingStart = 1; }; }
174,745
56.614903
271
java