8000 Removing unused region tags (#1393) · llozano100/java-docs-samples@788979d · GitHub
[go: up one dir, main page]

Skip to content

Commit 788979d

Browse files
Removing unused region tags (GoogleCloudPlatform#1393)
* Removing unused region tags * updating example region tagˆ * Rename tests to match new format * Changing system properties for tests
1 parent a7e39e7 commit 788979d

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

appengine-java8/bigtable/src/main/java/com/example/bigtable/BigtableHelloWorld.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.hadoop.hbase.client.Scan;
3131
import org.apache.hadoop.hbase.client.Table;
3232
import org.apache.hadoop.hbase.util.Bytes;
33-
// [START example]
33+
// [START bigtable_app_engine_standard_hw]
3434

3535
/**
3636
* A minimal application that connects to Cloud Bigtable using the native HBase API and performs
@@ -63,7 +63,6 @@ public static String create(Connection connection) {
6363
descriptor.addFamily(new HColumnDescriptor(COLUMN_FAMILY_NAME));
6464

6565
admin.createTable(descriptor);
66-
// [END creating_a_table]
6766
} catch (IOException e) {
6867
return "Table exists.";
6968
}
@@ -110,7 +109,7 @@ public static String doHelloWorld() {
110109
Result getResult = table.get(new Get(Bytes.toBytes(rowKey)));
111110
String greeting = Bytes.toString(getResult.getValue(COLUMN_FAMILY_NAME, COLUMN_NAME));
112111
result.append("Get a single greeting by row key<br>");
113-
// [END getting_a_row]
112+
114113
result.append(" ");
115114
result.append(rowKey);
116115
result.append("= ");
@@ -138,4 +137,4 @@ public static String doHelloWorld() {
138137
return result.toString();
139138
}
140139
}
141-
// [END example]
140+
// [END bigtable_app_engine_standard_hw]

appengine-java8/bigtable/src/main/java/com/example/bigtable/BigtableHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public void contextInitialized(ServletContextEvent event) {
100100
}
101101

102102
if (PROJECT_ID == null) {
103-
PROJECT_ID = System.getProperty("BIGTABLE_PROJECT");
103+
PROJECT_ID = System.getProperty("bigtable.projectID");
104104
}
105105
if (INSTANCE_ID == null) {
106-
INSTANCE_ID = System.getProperty("BIGTABLE_INSTANCE");
106+
INSTANCE_ID = System.getProperty("bigtable.instanceID");
107107
}
108108

109109
try {

appengine-java8/bigtable/src/main/webapp/WEB-INF/appengine-web.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
See the License for the specific language governing permissions and
1212
limitations under the License.
1313
-->
14-
<!-- [START config] -->
1514
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
1615
<threadsafe>true</threadsafe>
1716
<runtime>java8</runtime>
@@ -22,4 +21,3 @@
2221
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
2322
</system-properties>
2423
</appengine-web-app>
25-
<!-- [END config] -->

appengine-java8/bigtable/src/test/java/com/example/bigtable/ITBigtableHelloWorld.java renamed to appengine-java8/bigtable/src/test/java/com/example/bigtable/BigtableHelloWorldTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525

2626
/** Unit tests for {@link BigtableHelloWorld}. */
2727
@RunWith(JUnit4.class)
28-
@SuppressWarnings("checkstyle:abbreviationaswordinname")
29-
public class ITBigtableHelloWorld {
28+
public class BigtableHelloWorldTests {
3029

3130
private BigtableHelper helper;
3231

0 commit comments

Comments
 (0)
0