delete a particular segment in the shard.
550830
public static void deleteSegment(Olap olap, ApplicationDefinition appDef, String shard, String segment) {
        VDirectory appDir = olap.getRoot(appDef);
        VDirectory shardDir = appDir.getDirectory(shard);
        VDirectory segmentDir = shardDir.getDirectory(segment);
        segmentDir.delete();
    }
1173436
def remove(self, child):
        """"""
        for i in range(len(self)):
            if self[i] == child:
                del self[i]
1274332
def delete_partitions(self, ds):
        """"""
        from ambry.orm import Partition

        ssq = self.session.query

        ssq(Process).filter(Process.d_vid == ds.vid).delete()
        ssq(Code).filter(Code.d_vid == ds.vid).delete()
        ssq(ColumnStat).filter(ColumnStat.d_vid == ds.vid).delete()
        ssq(Partition).filter(Partition.d_vid == ds.vid).delete()
547007
def delete(self):
        
        j, r = self.datacenter.request('DELETE', self.path)
        r.raise_for_status()
762703
private void clearInternal(boolean clearMeta) {
        // Close all known segments
        for(int segId = 0, cnt = _segList.size(); segId < cnt; segId++) {
            Segment seg = _segList.get(segId);
            if(seg != null) {
                try {
                    if(seg.getMode() == Segment.Mode.READ_WRITE) {
                        seg.force();
                    }
                    seg.close(false);
                } catch (IOException e) {
                    _log.warn("failed to close segment " + seg.getSegmentId());
                } finally {
                    _segList.set(segId, null);
                }
            }
        }
        
        if(clearMeta) {
            try {
                updateMeta();
            } catch (IOException e) {
                _log.warn("failed to clear segment meta");
            }
        }
        
        _segList.clear();
        _recycleList.clear();
    }
419591
def delete(self):
        
        redis_search_key = ":".join([self.namespace, self.key, "*"])
        keys = self.conn.keys(redis_search_key)
        if keys:
            for key in keys:
                part = key.split(":")[-1]
                self._data.pop(part)
                self.conn.delete(part)

        del self
149019
def delete(self, key):
        
        obj = self._get_content()
        obj.pop(key, None)

        self.write_data(self.path, obj)
724846
def delete(self):
        """"""
        super().delete()
        self.character.place.send(self.character.place, key=self.name, val=None)
667705
public function delete($segment_one = '', $segment_two = '')
	{
		if ($segment_one === '')
		{
			$segment_one  = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
		}

		if ($segment_two === '')
		{
			$segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
		}

		$dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/';
		delete_files($dir_path, TRUE);
	}
330473
def delete(self):
        """"""
        with self._qpart:
            for cursor in self.cursors():
                if cursor.hasSelection():
                    cursor.deleteChar()
1289080
async def delete(self):
        """"""
        _val = await self.request.delete(
            self._base_path,
            params={
                ATTR_SCENE_ID: self._raw_data.get(ATTR_SCENE_ID),
                ATTR_SHADE_ID: self._raw_data.get(ATTR_SHADE_ID),
            },
        )
        return _val
1208480
def remove(self):
        
        self.__bulk.add_delete(self.__selector, _DELETE_ALL,
                               collation=self.__collation)
1212182
def cleanup_storage(*args):
    """"""
    ShardedClusters().cleanup()
    ReplicaSets().cleanup()
    Servers().cleanup()
    sys.exit(0)
995599
private void purgePaxosDecision(long segmentTxId) throws IOException {
    File paxosFile = journalStorage.getPaxosFile(segmentTxId);
    if (paxosFile.exists()) {
      if (!paxosFile.delete()) {
        throw new IOException("Unable to delete paxos file " + paxosFile);
      }
    }
  }
1297819
def delete(self, redis):
        '''  '''
        if self.index:
            redis.hdel(self.key(), getattr(self.obj, self.name))
1100056
private void discardSegment(final CommitLogSegment segment, final boolean deleteFile)
    {
        logger.debug("Segment {} is no longer active and will be deleted {}", segment, deleteFile ? "now" : "by the archive script");
        size.addAndGet(-DatabaseDescriptor.getCommitLogSegmentSize());

        segmentManagementTasks.add(new Callable<CommitLogSegment>()
        {
            public CommitLogSegment call()
            {
                segment.close();
                if (deleteFile)
                    segment.delete();
                return null;
            }
        });
    }
99361
def _delete(self, bits, pos):
        """"""
        assert 0 <= pos <= self.len
        assert pos + bits <= self.len
        if not pos:
            # Cutting bits off at the start.
            self._truncatestart(bits)
            return
        if pos + bits == self.len:
            # Cutting bits off at the end.
            self._truncateend(bits)
            return
        if pos > self.len - pos - bits:
            # More bits before cut point than after it, so do bit shifting
            # on the final bits.
            end = self._slice(pos + bits, self.len)
            assert self.len - pos > 0
            self._truncateend(self.len - pos)
            self._append(end)
            return
        # More bits after the cut point than before it.
        start = self._slice(0, pos)
        self._truncatestart(pos + bits)
        self._prepend(start)
        return